mirror of
https://github.com/fosrl/pangolin.git
synced 2026-09-29 09:19:04 +02:00
Merge pull request #3811 from Fra146/feature-badger-headers-config
Add config options and badger options injection
This commit is contained in:
@@ -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,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user