Forum Discussion
Eric_27859
Nimbostratus
Jul 29, 2011X-Forwarded-For and Route Domains issue with '%'
Hello,
I'm using the header X-Forwarded-For to tell the server the remote client IP (using AutoMap in the Virtual Server). When a Route Domain is involved, all the IPs are written with this format "IP%RouteDomainID". I've searched in the Wiki for IP::client_addr and the IP::addr ussage and didn't found how to extract in an easy manner the IP without the Route Domain. I also tried to use TCL string last, string trim and another string functions but without success.
Would you give me a hint about how should I get only the IP without the route domain?
Thank you in advance!
- The_Bhattman
Nimbostratus
Hi Eric, - Kevin_Davies_40
Nacreous
I assume you want the X-Forwarded-For address updated yes? Try this and let me know how it goes. - Kevin_Davies_40
Nacreous
I assume you want the X-Forwarded-For address updated yes? Try this and let me know how it goes. - The_Bhattman
Nimbostratus
HI Jarvil,when HTTP_REQUEST { HTTP::header insert X-Forwarded-For [getfield [IP::client_addr] "%" 1] }
- Kevin_Davies_40
Nacreous
Hi Bhattman, - The_Bhattman
Nimbostratus
Hi Jarvil, - Kevin_Davies_40
Nacreous
You will see two X-Forwarded-For values as I just tested it. So the best solution is likely... - Eric_27859
Nimbostratus
Sorry about my absence. - Eric_27859
Nimbostratus
Sorry about my absence. - Kevin_Davies_40
Nacreous
maybe this header is coming yet within the original request arriving to F5
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