"sticky proxy" issue for one application

I have an application running behind haproxy default setup, this application require to be aware of the IP adress/name of the reverse proxy

using a specific setup for the application I can make it work by trusting the IP/name adress of haproxy for this host eg:


However it just make the whole thing completely static, the app cannot move to another host and or any change to proxy will kill this static link.

any idea ?