Forum Discussion
Norman_Zhang
Nimbostratus
May 31, 2021X-Forwarded-For Log iRule
Currently I have "Insert X-Forwarded-For" field enabled on a http-custom profile. I would like to capture the field in the F5 log. * To enable this, I need to disable http-custom profile and us...
Daniel_Wolf
MVP
Jun 01, 2021Hi Norman,
you don't have to disable the custom HTTP Profile. You can use this iRule to log the XFF header which was set by the HTTP profile.
when HTTP_REQUEST {
if { [HTTP::header values "X-Forwarded-For"] ne "" } {
log local0. "X-Forwarded-For: [HTTP::header X-Forwarded-For]"
}
}
The iRule will read the XFF value which was inserted by the HTTP profile.
KR
Daniel
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