Forum Discussion
minnoce944
Nimbostratus
Jun 24, 2014denying access except for specific domains and paths
Hi, i have requirements to lock down specific domains and paths unless they are valid. This VIP has multiple domain names pointing at it so i'm trying to cover all possible conditions. I have somethi...
Kevin_Stewart
Employee
Jun 24, 2014Here's another option:
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"img.domain.com" {
switch -glob [string tolower [HTTP::uri]] {
"/path2/*" -
"/path3/*" {
return
}
default {
HTTP::respond 403
}
}
}
default {
if { not ( [string tolower [HTTP::uri]] starts_with "/path1/" ) } {
HTTP::respond 403
} else {
return
}
}
}
}
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