Forum Discussion
Albert__Tase_70
Nimbostratus
May 18, 2007need help on making an irule to check header
hope someone can help I need an irule to check the header for "NPG_SRC_ADDR" if its not in the header then insert it in the header and to include the client ip address I gone through the docs have been unablke to find the right syntax
in version 4 I used http profile but cannot do that in version 9 do to it being moved to the virtual so have to add it to an irule the logic is simple if "NPG_SRC_ADDR" is in the header go to a pool if not then insert it into the header and the clients ip address and go to the same pool issue is can't find the right commands to do it.
so if any one can help it would be appreaicated
Whats used to check header for spefic info
whats use to insert info into header including the client ip adress ?
thanks
Al
1 Reply
Sort By
- Colin_Walker_12Historic F5 AccountTo check a header for specific info you would use the HTTP::header command.
when HTTP_REQUEST { if { [HTTP::header exists "NPG_SRC_ADDR"] } { pool httpPool } else { HTTP::header insert "NPG_SRC_ADDR" [IP::client_addr] } }
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