Forum Discussion
Strip route domain from ip::remote_addr
- Sep 14, 2015
There are a number of ways of doing that, but here is one (though untested!) that should work:
when HTTP_REQUEST { HTTP::header insert X-Some-Header "[getfield [IP::client_addr] % 1]" }
For more information on
:getfield
I also encourage, for header insertion, that you consider using Local Traffic Policies, if possible:
Local Traffic Policies are part of the standard configuration, and as a consequence, are generally easier to operationalize, replicate and are better supported by F5. Moreover, built-in functions are usually faster than iRules because they are less generic. Having said that, of course, there are some functions that cannot be performed with Local Traffic Policies, and in those cases, iRules are the way to go.
Recent Discussions
Related Content
* 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