Forum Discussion
Scott123456789
Mar 23, 2017Cirrus
X-Forwarded-For through proxy and F5
My organization recently got the ASM module when they purchased a pair of 5250Vs. I've never used ASM before and we don't have anyone in our organization that has either, so I'm learning on the fly. ...
DevBabu
Mar 27, 2017Cirrus
The below code will check for X-Forwarded-For header. If id does not exist it will grab the client address and insert X-Forwarded-For Header in the request.
i.e if proxy already inserted X-Forwarded-For no need to worry as it will have the client IP. If not coming through proxy, insert XFF header with the client IP. Will this help ? Bit modified from Soda's iRule.
when HTTP_REQUEST {
if {not ([HTTP::header exists "X-Forwarded-For"])} {
set XFF [IP::remote_addr]
HTTP::header insert "X-Forwarded-For" $XFF
}
}
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