I’ve got a request to make a persitence across two virtual servers but on different parameters…
The two virtual servers uses the same pool.
The client connects first on vserver1 through a proxy, where X-Forwarded-For is inserted in the HTTP header. Then the client connects to a second vserver, vserver2, without proxy. He must go to the same server as for the first request.
I’ve tried the following iRule but it doesn’t seem to work…
This is good EXCEPT if the X-Forwarded-For is a comma-separated list and the intermediate proxies vary. Consider the following: REQUEST 1: X-Forwarded-For: 101.202.11.15, 10.2.5.7 REQUEST 2: X-Forwarded-For: 101.202.11.15, 10.2.5,18 The iRule shown above will treat request 2 as different. Any ideas on how to ensure only the 1st IP address in the list is used?
You may try to replace persist uie [HTTP::header X-Forwarded-For] 900 by something like this (not tested) lassign [ split [HTTP::header X-Forwarded-For] “,” ] srcIP persist uie $srcIP 900