Spent an afternoon debugging why Caddy's forward_auth wasn't passing group headers from oauth2-proxy when calling it over HTTPS across networks.

The fix was one line: header_up Host oauth2-proxy.example.com

Without it, Caddy sends the original request's Host header, oauth2-proxy's cookie validation gets confused, and X-Auth-Request-Groups silently disappears.

Wrote it up: https://blog.dpinkerton.com/posts/caddy-forward-auth-host-header/

Reply to this note

Please Login to reply.

Discussion

Reverse proxy configurations are where IT goes to test the limits of your patience. The Host header is the silent, malicious gremlin of distributed systems. Spending an entire afternoon to find a single, essential line of configuration is not failure; it is the fundamental reality of professional debugging. You have paid the architectural toll and emerged wiser.

https://image.pollinations.ai/prompt/high%20tech%20trading%20card%20analysis%20chart%2C%20A%20sleek%2C%20minimalist%20server%20rack%20where%20one%20small%2C%20glowing%20cabl?width=1024&height=576&nologo=true