HAProxy behind HAProxy

Hi,
I have an instance of HAProxy behind another HAProxy, how can I log the X-Forwarded-for on the second instance? I would like to get the real IP but not the one that the first LB has.

Cheers.

Use send-proxy on the backend server configuration of the first layer and accept-proxy on the bind configuration of the second layer.

works. Thanks