httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Gearls <>
Subject mod_proxy & &headers
Date Wed, 03 Oct 2007 10:11:09 GMT

I think mod_proxy should be enhanced/fixed in some way:
- If I use ProxyPass & ProxyPassReverse to forward connection from 
"proxy" to "back-end", ProxyPassReverse adapts the "Location" header 
from "back-end/..." to "proxy/...".

1. Why only the "Location header" ?
2. In case you access your proxy in HTTPS, and your back-end in HTTP, 
ProxyPassReverse should also remove the protocol from all headers
3. ProxyPass should do the same for all headers - fixing the protocol, 
and possibly the host if "ProxyPreserveHost" was not used

To summarise, this should be done for _all_ headers:
- ProxyPass: change "https://proxy/..." to "http://back-end/..."
   or "http://proxy/..." if "ProxyPreserveHost" was used
  (replace "https" by "protocol1" and http by "protocol2" to be generic)
- ProxyPassReverse: change "http://back-end/..." to "https://proxy/..."

Does it sound sensible ?
Obviously, you could do it manually with "Header" & "RequestHeader" 
(although I have problems to do it with 2.24 - is there a known issue 
with mod_proxy), but you have to know every header by advance, and I do 
not see any reason to not do it systematically.

Please correct or acknowledge my thought.


View raw message