Enable HTTP_X_FORWARDED_FOR in Haproxy

By default, Haproxy won’t forward visitor IP address to backend servers. To enable Haproxy forward visitor IP address to backend server using HTTP_X_FORWARDED_FOR header, edit haproxy.cfg

Add

This can be added in blocks defaults, frontend, backend or listen.

Example

Leave a Reply

Your email address will not be published. Required fields are marked *