Forum Discussion
Prerak_Tiwari_3
Nimbostratus
Sep 29, 2017iRule to check the referer presense
I am trying to write a iRule to accommodate the following, If the Referer is “mydomain.example.com” then allow the request, if not then check if requested URI is the login page then allow, if not the...
Stanislas_Piro2
Cumulonimbus
Sep 29, 2017Hi,
don't redirect to referer:
when HTTP_REQUEST {
switch -glob [HTTP::header "Referer"] {
"https://mydomain.example.com/*" {
do nothing and leave irule
return
}
default {
if{[HTTP::uri] contains "/enter.do"} {
HTTP::redirect [HTTP::header "Referer"]
} else {
HTTP::respond 500 content ""
}
}
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects