How to reduce the number of values in the incoming X-Forwarded-For header in Apache httpd?
Issue
-
We use an httpd proxy in front of our application server. Clients access httpd through a number of other balancers and proxies. So by the time the request reaches the backend app server, there are 3 or more values in the X-Forwarded-For header. This causes issues for the application so is there some way the X-Forwarded-For values could be reduced in the request as it passes through the httpd proxy before the app server?
-
We need to bypass all the IP address in X-Forwarded-For (except actual client IP address which we want to forward to backend JBoss EAP server), Is there a way to configure this at Apache httpd layer? We do have h/w load balancer in front of Apache httpd server.
Environment
- Red Hat JBoss Core Services (JBCS) Apache httpd 2.4.x
- Red Hat Enterprise Linux (RHEL) 7.x,8.x,9.x
- httpd-2.4.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.