nixos/oauth2-proxy: fix warning condition (#520786)

This commit is contained in:
K900
2026-05-16 09:57:58 +00:00
committed by GitHub
@@ -629,7 +629,7 @@ in
}
];
warnings = lib.mkIf (cfg.reverseProxy -> cfg.trustedProxyIP == [ ]) [
warnings = lib.mkIf (cfg.reverseProxy && cfg.trustedProxyIP == [ ]) [
''
When config.services.oauth2-proxy.reverseProxy is enabled, configure config.services.oauth2-proxy.trustedProxyIP to the IPs or CIDR range(s) of the reverse proxies that are allowed to send X-Forwarded-* headers.
If you leave it unset, OAuth2 Proxy currently trusts all source IPs for backwards compatibility, which means a client that can reach OAuth2 Proxy directly may be able to spoof forwarded headers.