John_Bartoldus_
Sep 14, 2015Nimbostratus
Strip route domain from ip::remote_addr
Hello.
Trying to create an irule and when using ip::remote_addr, it is adding the %rd to the IP address. I am fairly new to irules, but wondering if that route domain designation can be stripped from the value before putting it into the http header.
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: