Forum Discussion
k20
Nimbostratus
Dec 04, 2020Need help to whitelist URI's
I need some help with the iRule. The goal is to allow users to access a limited number of URI's from the Internet but open to all for internal users. I have created a datagroup that contains th...
Dec 04, 2020
Hi k20,
Can you try this iRule?
when HTTP_REQUEST {
if { [class match [IP::client_addr] equals internal_subnets] } {
pool app_80_pool
}
else {
switch -glob [HTTP::uri] {
"/foo/combined.js*" -
"/foo/css/*" -
"/foo/desktopreset" -
"/foo/doc/*" -
"/foo/error404.html" -
"/foo/external/*" -
"/foo/favicon.ico" -
"/foo/home.jsf" -
"/foo/images/*" -
"/foo/include/*" -
"/foo/javax.faces.resource/*" -
"/foo/login.jsf" -
"/foo/resources/*" -
"/foo/scripts/*" -
"/foo/ui/*" -
"/foo/user/*" -
"/sorry.html" { pool app_80_pool }
default { HTTP::redirect "http://app.com/sorry.html" }
}
}
}- k20Dec 04, 2020
Nimbostratus
Just tried your suggestion. However, when I go to the http://app.com it takes me to the sorry.html which is not what I want.
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
