hcloud-cloud-controller-manager icon indicating copy to clipboard operation
hcloud-cloud-controller-manager copied to clipboard

Get X-Real-IP header from Load Balancer

Open jaumecornado opened this issue 5 years ago • 2 comments

It seems load balancer does not respect X-Real-Ip and X-Forwarded-For headers and always getting LB ip into those values.

There is a way to pass it through?

jaumecornado avatar Mar 17 '21 19:03 jaumecornado

Hey @jaumecornado,

i guess your service is a raw TCP service or? You could try to set the load-balancer.hetzner.cloud/protocol annotation to http/(https). Link to FAQ: https://docs.hetzner.com/cloud/load-balancers/faq/#do-load-balancers-forward-special-http-headers

LKaemmerling avatar Mar 18 '21 05:03 LKaemmerling

With proxprotocol works perfectly. Added load-balancer.hetzner.cloud/uses-proxyprotocol: "true" to fix

jaumecornado avatar Mar 24 '21 10:03 jaumecornado