I am attempt to buffer a query parameter and set the value in an environment variable to overwrite the X-Forwarded-For header, but with out success.
Something like below. For testing, we would like to process passed ips, but internally the application is always getting the NAT ip. I need to capture the query value and pass to the application as the X-Fowarded-For header.
If hardcode the set I do notice that the app gets a comma list of forwarded ips, which I do understand why that is happening. <hardcode ip>,<fw ip> Hope to clobber and send one down. The important thing I need to capture via query string. My %{FOO}e is reporting (null).
[
sitename...]
RewriteEngine on
RewriteRule ^/\?ip=
(.*)$ - [E=FOO:
$1]
RewriteRule ^/? balancer://clusterName/appcontext/file.jsp [P,QSA,L]
<Proxy balancer://clusterName>
RequestHeader unset X-Forwarded-For
RequestHeader set X-Forwarded-For
%{FOO}e Header echo X-Forwarded-For
BalancerMember [
<app>:<port>...] options=value
</Proxy>
Still researching the proxy interpolate env directive(s).
Any ideas?
David