Add config options and badger options injection

This commit is contained in:
Fra146
2026-09-24 11:42:05 +02:00
parent 29d93a574b
commit 7ad56a8bae
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -149,6 +149,8 @@ export const configSchema = z
})
.optional(),
trust_proxy: z.int().gte(0).optional().default(1),
trust_ips: z.array(z.string()).optional().default([]),
custom_ip_header: z.string().optional().default(""),
// Opt-in: have Traefik/Badger stamp the resolved client IP
// into a dedicated header (X-Pangolin-Client-Ip) on the
// site-resource AI gateway route, so it survives an
@@ -51,6 +51,10 @@ export async function traefikConfigProvider(
.internal_hostname
}:${config.getRawConfig().server.internal_port}`
).href,
disableDefaultCFIPs: config.getRawConfig().server.trust_ips.length > 0,
customIPHeader: config.getRawConfig().server.custom_ip_header,
trustip: config.getRawConfig().server.trust_ips,
userSessionCookieName:
config.getRawConfig().server.session_cookie_name,