Forum Discussion
rsingh1988_3382
Altostratus
Nov 10, 2017conditional 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
Nacreous
Nov 10, 2017Hi, 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]
}
}