Forum Discussion
AdityaVyas_3582
Nimbostratus
Apr 11, 2018How to capture the last ip address written in my x forwarded for header.
Hi, i want to capture the last ip address written in my x forwarded for header which is the proxy ip for my organisation. I wanted to use this ip in an irule to do some other stuff. How i can achieve...
youssef1
Cumulonimbus
Apr 11, 2018Hello,
Try this, irule is simple, you can begin with this and if you need more details or more specification le me now...
when HTTP_REQUEST {
foreach header [HTTP::header names] {
log local0. "HTTP Header : $header = [HTTP::header values $header]"
if {$header == "X-Forwarded-For"} {
in xff it will set the last value of X-Forwarded-For
set xff "[HTTP::header values $header]"
}
}
}
Regards
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