XFF Universal Persistence iRule
Problem this snippet solves: Simple iRule to read the XFF header on an incoming HTTP Request and use a Universal Persistence ID.
Orginal iRule found to have an issue with multiple IP addresses in th...
Updated Jun 06, 2023
Version 2.0Andy_McGrath
Cumulonimbus
Joined November 14, 2005
Andy_McGrath
Jun 26, 2016Cumulonimbus
Hi Sumanta,
Issue found was when XFF header contained multiple IP addresses so my code splits up the header and only uses the first IP address, this should be the first XFF header applied.
If this is not an issue for you, either you happy to use the full XFF header or only ever has a single address in the XFF header, then your code looks fine.
Finally no you do not need to use with OneConnect for this to work but in my situation we were using OneConnect as was being applied to an application virtual server where the client was a server using multiplexing. Also one of the reasons we needed this as the full XFF headers changed depending on the which of the many servers sent the request so we needed to strip it back to a common identifier.