Forum Discussion
RJ_171490
Nimbostratus
Sep 03, 2018Allow or Restrict access based on urls.
Hi All,
What's the best way to allow or restrict access to webserver based on the urls used by the user.
I want the connection to be allowed if the user uses the below urls and deny any ot...
Kevin_Stewart
Employee
Sep 03, 2018Im thinking a switch would be easiest:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host][HTTP::uri]] {
"11.11.103.139/uii/*" -
"usd-msp10.inf.us.cvr.com/websso/*" {
log local0. "[HTTP::host][HTTP::uri] allowed"
}
default {
log local0. "[HTTP::host][HTTP::uri] blocked"
reject (or drop, or HTTP redirect, or HTTP respond)
}
}
}
You could also do this with a CPM local traffic policy, which would probably be a little faster.
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
