httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 29856] - RequestHeader directive does not expand env vars for mod_proxy
Date Tue, 29 Jun 2004 08:10:00 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29856>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29856

RequestHeader directive does not expand env vars for mod_proxy





------- Additional Comments From jlawson-apache@bovine.net  2004-06-29 08:09 -------
That's pretty unfortunate.  I might choose to disagree about your terminology
since the mod_rewrite page classifies REMOTE_ADDR as a "server-variable"
<http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html#rewritecond>

Just for the benefit of anyone else who ever needs to do the same thing, you can
do this by adding the following lines inside of your <Proxy *></Proxy> block
using mod_headers and mod_rewrite:

RewriteEngine On
RewriteCond %{REMOTE_ADDR} ^(.*)
RewriteRule ^.* - [env=MY_REMOTE_ADDR:%1]
RequestHeader set X-Forwarded-For "%{MY_REMOTE_ADDR}e"

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message