"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:

TRUSTED_PROXIES=5b36dc59-a0bf-44ca-8ed4-4c0d0df3075f,10.42.122.79

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 ?