HAProxy Enterprise Documentation 1.6r1

Client IP preservation

Because HAProxy Enterprise is a reverse proxy, meaning that it acts as a man-in-the-middle between the client and server, the client's source IP address is masked by HAProxy Enterprise's own IP address in the server-side connection. That can fill server-side logs with entries that appear as though HAProxy Enterprise initiated the requests.

HAProxy Enterprise supports the following ways to preserve a client's IP address:

Add an X-Forwarded-For header

Preserve the client's source IP address by adding an X-Forwarded-For header.

Enable the Proxy Protocol

Preserve the client's source IP address by enabling the Proxy Protocol.


Next up

Add an X-Forwarded-For header