Created
October 18, 2018 18:09
-
-
Save Wicaeed/0782841a4d444cc720f84d7f8d23420d to your computer and use it in GitHub Desktop.
iRule Comparision
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if { [matchclass $clientIP equals External_IP] } | |
{ | |
if { ([string tolower [HTTP::uri]] starts_with "/website/account/login") } { | |
set qnode [string tolower [URI::query [HTTP::uri] "_node"]] | |
set setcookie true | |
} else { | |
set qnode "" | |
set setcookie false | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if { [class match [IP::client_addr] equals CDN_IP_Addr] && [HTTP::header exists "X-Forwarded-For"] } { | |
# Insert a new clientIP header with X-Forwarded-For value | |
set clientIP [HTTP::header value "X-Forwarded-For"] | |
} else { | |
set clientIP [IP::client_addr] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment