Forum Discussion

rglus6970_30822's avatar
rglus6970_30822
Icon for Nimbostratus rankNimbostratus
Jul 17, 2018

Environment Variable - Policy or iRule

Hello, I am trying to figure out how to convert an apache rewrite to a ltm policy and I am looking for a little help. RewriteCond %{REMOTE_ADDR} (.) RewriteRule . - [E=EXAMPLE_COM_CLIENT:%1,C] RequestHeader set CQ-SSL-Proxy-Client-IP "%{EXAMPLE_COM_CLIENT}e"

 

It doesn't appear in the policy that you can match on an environment variable such as REMOTE_ADDR and I am not sure how to string a value of "ANY". I am also not sure if the variable is X_FORWARDED_FOR or REMOTE_ADDR but again, the only policy option I see that would be close, is HTTP_HEADER but it doesn't seem to allow anything with the env variable. Note I am not an apache eng, I have just been reading as I have a requirement to convert this to a policy or for that matter an irule. If I can also ask, if this retwrite rule is setting the header to CQ-SSL-Proxy-Client-IP, then is it replacing the original header or adding a second header? And if it replaces, what is the original header name to replace? Thanks for any help and/or correction of my understanding.

 

No RepliesBe the first to reply