Forum Discussion
Robert_Pagano_7
Nimbostratus
May 30, 2013deny access to certain URIs based on client source IP address and URI being accessed
I have been asked to deny access to a virtual server if ...
[1] the client is coming from a "non-private" (i.e. not RFC 1918) IP address
and
[2] the client is trying to access any one ...
Kevin_Stewart
Employee
May 31, 2013The switch -glob syntax allows you to catch wildcard data, so if the user added a hash tag and some text at the end of the URI, the application would probably ignore it, but then so would your static evaluation. I would then recommend something like this:
switch -glob [string tolower [HTTP::uri]] {
"/blah-blah-blah*" -
"/system/yada-yada-yada?config=1&usertype=1&other-stuff=true*" -
"/system/yada-yada-yada?config=1&usertype=2&other-stuff=true*" { drop }
}
Just added the star "*" to the end of each URI to catch anything AFTER that string as well.
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