Forum Discussion
rsingh1988_3382
Nov 10, 2017Altostratus
conditional iRule for X-Forward-for
I have a requirement where client wants x-forward-for work in conditional manner. For example if client/user access abc.com then x-forward-for should not work but if client/user access abc.com/xyz, i...
Lee_Sutcliffe
Nov 10, 2017Nacreous
Hi, this iRule should do what you require
when HTTP_REQUEST {
if {([HTTP::host] equals "abc.com") && ([HTTP::uri] starts_with "/xyz")} {
HTTP::header insert X-Forwarded-For [IP::client_addr]
}
}
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