Forum Discussion
Kai_Wilke
Feb 03, 2016MVP
Hi Steve,
you may try the snippet below...
when HTTP_REQUEST {
if { [HTTP::header value "X-Forwarded-For"] ne "" } then {
log local0. "PATTS \"X-Forwarded-For\" header: [HTTP::header value "X-Forwarded-For"]"
persist uie [HTTP::header value "X-Forwarded-For"] 1830
} else {
log local0. "No \"X-Forwarded-For\" header found."
}
}
Note: I duno if you posted just the half iRule for illustration purposes? I've completed then given iRule, tweaked here and there a little bit the syntax and added an additional [log] statement to get some ouput if no X-Forwarded-For header is not present or somehow empty.
Cheers, Kai