caddy2-proxyprotocol icon indicating copy to clipboard operation
caddy2-proxyprotocol copied to clipboard

Reverse Proxy fails Google Compute Cloud https healthcheck behind TCP load balancer

Open absorbb opened this issue 3 years ago • 0 comments

Caddy 2.5.2

I try to make Caddy handles all HTTPs in my Google Compute Cloud setup. So i install caddy behind External TCP load balancer.

Our service relies on client IP. That is why i enable PROXY protocol for load balancer. and setup your plugin But once plugin enabled all request must use PROXY protocol that is why i set GCC https health check to use PROXY protocol too, Problem is that health-check sends PROXY UNKNOWN header. and plugin sets client ip to empty value. https://cloud.google.com/load-balancing/docs/health-checks#optional-flags-hc-protocol-http

Reverse Proxy fails with error: preparing request for upstream round-trip: invalid client IP address: and there is no way health-check will be passed.

I guess replacing IPs with empty values is wrong. in case of PROXY UNKNOWN header it is better to leave original(proxy) values in requests

absorbb avatar Jul 13 '22 17:07 absorbb