Forum Discussion
Vijay_E
Mar 23, 2017Cirrus
I am not sure about the efficiency level you can achieve but I would recommend considering this untested version:
when HTTP_REQUEST {
if { [active_members MYPOOL-PORT-443] < 1 } {
HTTP::redirect "http://maintenance-page.company.com"
} else {
set CHECK_IP [getfield [HTTP::header values X-Forwarded-For] " " 1]
if { ([class match $CHECK_IP eq "DG-XFF-ALLOWED-IP-LIST"]) } {
if { [class match [HTTP::uri] eq "DG_RESTRICTED_URI"] } {
pool MYPOOL-PORT-443
elseif { [class match [HTTP::uri] eq "/URI1/URI2/PORTAL/ADMIN"] } {
HTTP::redirect "https://[HTTP::host]/SECRET/URI1/URI2/ADMIN/"
}
}
}
}
}