Merge pull request #3811 from Fra146/feature-badger-headers-config

Add config options and badger options injection
This commit is contained in:
Owen Schwartz
2026-09-25 09:40:05 -04:00
committed by GitHub
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,