Annsar_Akhtar
Mar 17, 2015Nimbostratus
Setting IP:remote_addr using a custom header
Hi All
We have a custom app which is hard coded to capture the ip:remote_addr and wondering if it possible to replace this with a custom header via an irule.
Currently the app logs the F5 self ip and I know its possible using X-Forwarded-For header enabled in a HTTP profile to capture the client ip but was wondering if their is a way to use the value from a custom header, this would mean the custom app wont have to be rewritten. The custom header is being inserted via our CDN and wondering if something like the below would work:
when HTTP_REQUEST { HTTP::header insert True-Client-IP-CDN [IP::client_addr] log local0. "Client IP: [IP::client_addr]" }
Thanks