Caddy forward_auth to an External oauth2-proxy: The Host Header Gotcha
I run multiple Caddy instances across separate networks, all using a shared oauth2-proxy for authentication. The setup worked fine when Caddy and oauth2-proxy were on the same network. When I moved some services to a different network and had Caddy call oauth2-proxy over its public HTTPS endpoint, group-based authorization broke silently. Users could log in. The cookie was valid. But every request failed with “Access denied: No group membership found.” ...