You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(proxy): add forwardAuthorization flag to control token forwarding
- Introduced `--proxy-forward-authorization` command line option.
- Updated configuration documentation to include new option.
- Modified proxy handling to conditionally forward the Authorization header based on the new flag.
- Added tests to verify the behavior of the new flag.
|`--proxy-bearer-token`|`PROXY_BEARER_TOKEN`| - | Bearer token to add to Authorization header when proxying requests |
182
-
|`--proxy-headers`|`PROXY_HEADERS`| - | Comma-separated list of headers to add when proxying requests (format: Header1:Value1,Header2:Value2) |
181
+
|`--proxy-bearer-token`|`PROXY_BEARER_TOKEN`| - | Bearer token to add to Authorization header when proxying requests |
182
+
|`--proxy-forward-authorization`|`PROXY_FORWARD_AUTHORIZATION`|`false`| Forward the incoming Authorization bearer token to the backend after validation |
183
+
|`--proxy-headers`|`PROXY_HEADERS`| - | Comma-separated list of headers to add when proxying requests (format: Header1:Value1,Header2:Value2) |
183
184
|`--header-mapping`|`HEADER_MAPPING`| - | Comma-separated mapping of JSON pointer paths to header names (e.g., `/email:X-Forwarded-Email`) |
184
185
|`--header-mapping-base`|`HEADER_MAPPING_BASE`|`/userinfo`| JSON pointer base path for header mapping claims lookup (e.g., `/userinfo` or `/`) |
185
186
|`--http-streaming-only`|`HTTP_STREAMING_ONLY`|`false`| Reject SSE (GET) requests and keep the backend operating in HTTP streaming-only mode |
rootCmd.Flags().StringVar(&proxyBearerToken, "proxy-bearer-token", getEnvWithDefault("PROXY_BEARER_TOKEN", ""), "Bearer token to add to Authorization header when proxying requests")
382
+
rootCmd.Flags().BoolVar(&forwardAuthorizationHeader, "proxy-forward-authorization", getEnvBoolWithDefault("PROXY_FORWARD_AUTHORIZATION", false), "Forward the incoming Authorization bearer token to the backend after validation")
379
383
rootCmd.Flags().StringVar(&trustedProxies, "trusted-proxies", getEnvWithDefault("TRUSTED_PROXIES", ""), "Comma-separated list of trusted proxies (IP addresses or CIDR ranges)")
380
384
rootCmd.Flags().StringVar(&proxyHeaders, "proxy-headers", getEnvWithDefault("PROXY_HEADERS", ""), "Comma-separated list of headers to add when proxying requests (format: Header1:Value1,Header2:Value2)")
381
385
rootCmd.Flags().BoolVar(&httpStreamingOnly, "http-streaming-only", getEnvBoolWithDefault("HTTP_STREAMING_ONLY", false), "Reject SSE (GET) requests and keep the backend in HTTP streaming-only mode")
0 commit comments