Forum Discussion
Albert__Tase_70
Nimbostratus
Jan 14, 2008Catch all
I have a very large irule and currently I need to add the following logic but not sure how too
I alkimia inserts say x in the http header when stff comes from them I need to be able to catch the requests not coming from them and insert the remote ip address.
elseif{ HTTP:header contains X do nothing process the rest of the rule if http header dose not contain X inserts X plus remote IPaddress pool X I need to make sure that if X is present in the header I do not add it again
thanks
- hoolio
Cirrostratus
Hello Al,when HTTP_REQUEST { Check if HTTP header X is not present in the request and does not have value if {not ([string length [HTTP::header value X])]}{ HTTP::header insert X [IP::client_addr] } }
- Albert__Tase_70
Nimbostratus
almost if http:header dose not have X in the httpheader then insert client ip alkimia inserts x into the http header and we need a way to catch traffic that dose not go through the alkima would be easy if it was just one url but they want all traffic that dose not have x in the header to get the client ip inserted to the http header this will be goign into a massive redirectr rule of elseif statements and need to make sure when I apply it to the rule that if it already has x in the header it just sends traffic on. - hoolio
Cirrostratus
How about this?when HTTP_REQUEST { Check if HTTP header X does not have an IP address for the value if {not ([HTTP::header value X] matches_regex {\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}})}{ Insert the client IP address in the X header HTTP::header insert X [IP::client_addr] } }
- Albert__Tase_70
Nimbostratus
elseif { not({HTTP:header XXX_SRC_ADDR) HTTP::header insert XXX_SRC_ADDR [IP::remote_addr])} - Albert__Tase_70
Nimbostratus
thanks
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects