feat: support lan/tailnet endpoint selection for presigned URLs
This commit is contained in:
@@ -6,6 +6,8 @@ const envSchema = z.object({
|
||||
APP_NAME: z.string().min(1).default("porthole"),
|
||||
NEXT_PUBLIC_APP_NAME: z.string().min(1).optional(),
|
||||
ADMIN_TOKEN: z.string().min(1).optional(),
|
||||
MINIO_PUBLIC_ENDPOINT_LAN: z.string().url().optional(),
|
||||
MINIO_ENDPOINT_MODE: z.enum(["tailnet", "lan", "auto"]).default("auto"),
|
||||
});
|
||||
|
||||
let cachedEnv: z.infer<typeof envSchema> | undefined;
|
||||
@@ -31,3 +33,13 @@ export function getAdminToken() {
|
||||
const env = getEnv();
|
||||
return env.ADMIN_TOKEN;
|
||||
}
|
||||
|
||||
export function getMinioEndpointMode() {
|
||||
const env = getEnv();
|
||||
return env.MINIO_ENDPOINT_MODE;
|
||||
}
|
||||
|
||||
export function getMinioPublicEndpointLan() {
|
||||
const env = getEnv();
|
||||
return env.MINIO_PUBLIC_ENDPOINT_LAN;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user