Forum Discussion
dinodell4477
Feb 11, 2022Nimbostratus
XFF replace iRule help
How would I go about replacing the X-Forwarded-For header with a value from another header such as "Real-Client-IP" for example. Something like the below is what i'm statrting with but this obviously isnt working.
when HTTP_REQUEST {
HTTP::header replace X-Forwarded-For HTTP::header value Real-Client-IP [HTTP::header value X-Forwarded-For]
}
Thanks in advance!
Hello Tetimmons.
Try this:
when HTTP_REQUEST { HTTP::header replace X-Forwarded-For [HTTP::header value Real-Client-IP] HTTP::header remove Real-Client-IP }
- dinodell4477Nimbostratus
Thanks all!
Hello Tetimmons.
Try this:
when HTTP_REQUEST { HTTP::header replace X-Forwarded-For [HTTP::header value Real-Client-IP] HTTP::header remove Real-Client-IP }
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