Have anyone configured a java application to log client IP when the java application is running behind haproxy in tcp mode and the haproxy is configured to send the “send-proxy” header. A sample configuration is given below:
timeout client 300s
timeout server 300s
server SERVER-1 22.214.171.124:1000 check send-proxy
The java application is running on the 126.96.36.199 backend server and I want to log the original client IP addresses. Right now when the IP address is logged through InetAddress.getLocalHost();
I am using HAproxy 2.4.4 which is the latest version right now.
Thank you very much.