Forum Discussion
Jason_G__141424
Nimbostratus
Oct 28, 2014iRule to deal with multipule x-forwarded-for addresses in same request
I am currently having an issue with an iRule that I have written/borrowed. Below is a portion of the iRule that tracks the Clients IP addresss.
when CLIENT_ACCEPTED {
Collect the remote IP...
R_Eastman_13667
Oct 28, 2014Historic F5 Account
You can always use a foreach statement:
foreach headerName [HTTP::header names] {
if {[string tolower $headerName] eq "x-forwarded-for"} {
append clientIP [HTTP::header value $headerName]
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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