Forum Discussion
Prerak_Tiwari_3
Nimbostratus
8 years agoiRule 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...
stan_piron
Cumulonimbus
8 years agoHi,
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 ""
}
}
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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