Hello,
I have in my config
option http-server-close
option forwardfor
http-request set-header X-Client-IP %[src]
The logs are showing the IP address of a frontward facing load balancer, not the x-forwarded client IP. How can I make it show the true client IP in the connection logs?
What type of load-balancer is in front of HAProxy?
Is it one that perhaps implements the PROXY protocol?
However, assuming that you can’t update the configuration of the upstream load-balancer, you can use capture request header feature to capture the X-Forwarded-For
request header, and thus see them in the logs as described in HTTP log format.
Thank you, that was it.
Added capture request header X-Forwarded-For len 15
into my config.