You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Chris Markle <cm...@asperasoft.com> on 2010/10/28 01:22:21 UTC

[users@httpd] can I use "Header unset X-Forwarded-Host" to get rid of that header? Doesn't seem to work if so...

My Apache fu is not strong so please keep that in mind here...

I have configured Apache (2.2.16 on Centos 5) as  a reverse proxy.
When I proxy through this configuration to a remote HTTP server,
Apache is adding X-Forwarded-For, X-Forwarded-Host and
X-Forwarded-Server headers to the requests sent to the remote server.
For some reason the remote HTTP server is barfing on the fact that
X-Forwarded-Host is included, at least when the X-Forwarded-Host does
not match Host (which would be the case most of time I would think). I
have contacted the folks running the remote server about this to see
wht their issue is with X-Forwarded-Host.

In the meantime, I'd like to strip (unset) any X-Forwarded-Host
headers on responses sent in this proxying case. I tried "Header unset
X-Frowarding-Host" (and the same for RequestHeader although I think
it's Header I want here) in my VirtualHost definition where the Proxy
stuff is (e.g., ProxyPass), but the header is still appearing in the
responses.

Can this header actually be unset this way? If so, any thought or
pointers to what I could be doing wrong?

Happy to provide more information if needed. Thanks in advance...

Chris

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org