Undertow has setReuseXForwarded() method in the builder API of ModCluster and ProxyHandler to enable support to reuse X-Forwarded-* request headers (like X-Forwarded-For header).
However, the undertow subsystem does not expose it as the configurable parameter of <mod-cluster> and <reverse-proxy>.
This parameter is useful when the undertow load balance proxy is backed by another proxy server. In such a scenario, the front-end proxy adds X-Forwarded-* request headers to provide information about the original requester.
However, as the current undertow subsystem does not have a configurable parameter to reuse it, undertow mod-cluster and reverse-proxy always overwrite X-Forwarded-For request header with its own information.