pmaubo3_109863
Feb 08, 2012Nimbostratus
X-Forward-For irule
There is an irule in place which was there before I started working at my position.
See below
when HTTP_REQUEST {
if {[HTTP::header exists X-Forwarded-For]}{
HTTP::header replace X-Forwarded-For "[HTTP::header X-Forwarded-For], [getfield [IP::client_addr] % 1]"
} else {
HTTP::header insert X-Forwarded-For [getfield [IP::client_addr] % 1
}
}
However, I do see this message in viewing the log
invoked from within "HTTP::header replace X-Forwarded-For "[HTTP::header X-Forwarded-For], [getfield [IP::client_addr] % 1]""
local/tmm err tmm[5538]: 01220001:3: TCL error: x-forwarded-for_single - Operation not supported (line 1)
What is the getfield entry do? And is that causing the issue. Does the messages in the logs means the irule is failing all the time.
The reason I ask is we have one app group who has an intermittent issue with windows times out when they envoke a trade symbol in their application and I've gone through all the configs without having an luck. Could it be possible that this might be causing the issue.
I do know the below irule would work, just wanted some input from those who are more experienced.
when HTTP_REQUEST {
if {[HTTP::header exists X-Forwarded-For]}{
HTTP::header replace X-Forwarded-For "[HTTP::header X-Forwarded-For], [IP::client_addr]"
} else {
HTTP::header insert X-Forwarded-For [IP::client_addr]
}
}