httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Deffontaines <>
Subject [PATCH] Suggesting a new mod_proxy ProxyAddHeaders directive
Date Sat, 15 Jan 2011 22:19:44 GMT

Following a small discussion on #httpd irc channel, about 
X-Forwarded-For, X-Forwarded-Host and X-Forwarded-Server.
These headers are currently set or altered by mod_proxy_http whenever a 
reverse proxy request is handled.

Using RequestHeader to unset these headers is unefficient, probably for 
order processing reasons. Even if it was possible, it would not be 
sufficient, since an administrator might want to pass already existing 
headers without altering them, rather than just unsetting them.

Here is a small patch against trunk. This patch introduces the 
ProxyAddHeaders directive.
If set to "On" (default), the current mod_proxy_http behavior is kept : 
X-Forwarded-* headers are set, or completed for the request sent to the 
backend server.
If set to "Off", X-Forwarded-* headers are just passed as in the client 
request, if defined.

I have included the documentation patch, unsure whether it should be 
commited separately ?
Please comment and correct me if needed.

Vincent Deffontaines

View raw message