Forum Discussion
wlepkin_98758
Apr 12, 2012Nimbostratus
string range arguments
Hi, I'm trying to capture the first x-forwarded-for header value in an http request. There's probably a more efficient way to do this, but this is what I came up with:
when HTTP_REQUEST {
...
hooleylist
Apr 13, 2012Cirrostratus
Hi Wayne,
Can you try this to get the first xff IP:
when HTTP_REQUEST {
scan [HTTP::header values x-forwarded-for] {%d.%d.%d.%d%*s} a b c d
set first_xff $a.$b.$c.$d
}
Aaron
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