Forum Discussion
FaresB
Nimbostratus
Apr 22, 2020Blocking an URI wildcard to a specific Hostname and using an header
Hi, I'm trying to block wildcard " /* "but I need to allow access to " /pathA/* " and " /pathB/* " from a specific hostname, I need also to block these paths in the "Referer" header. Ba...
FaresB
Nimbostratus
Apr 23, 2020Nevermind, Actually this iRULE seems to be ok !!
I used only this one on my VS and everything looks fine ,
the condition switch -glob [HTTP::path][HTTP::header Referer] is perfect in my case !!
Thanks you cjunior !!
Here the solution worked on my case:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] contains "hostname" } {
switch -glob [HTTP::path][HTTP::header Referer] {
"*/pathA*" -
"*/pathB*" { }
default { log local0. "condition header et hostname"
reject }
}
}
}
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
