Forum Discussion
oguzy
Aug 31, 2021Cirrostratus
Hi ant77,
You can try below one (please do not forget to change port_number to listening port on your backend server):
when HTTP_REQUEST {
set clientip [lindex [ split [lindex [HTTP::header values X-Forwarded-For] 0] "," ] 0]
if {[HTTP::header X-Forwarded-For] != "" && $clientip equals "200.200.200.200" } then {
persist uie $clientip
node 10.10.10.11 port_number
} else {
persist uie [IP::client_addr]
pool AppServer123
}
}
https://clouddocs.f5.com/api/irules/node.html
If you also need to persistence based on XFF other than 200.200.200.200, you should modify the irule.