Forum Discussion
Jay_Christopher
Nimbostratus
Jan 26, 2006Using an iRule to create an access control list.
Is it possible to put a list of regular expressions into a data group and use an iRule to evaluate them against a URI.
I am thinking it would look something like this:
when HTTP_REQUEST {
if { [matchclass [HTTP::uri] equals $::uri_allow] } {
log local0. " URL ALLOWED [HTTP::uri]"
} else {
log local0. "!!!! URL DENIED !!!! [HTTP::uri]"
}
}
The list may contain things like:
^/favicon.ico$
^/images/.*\.(gif|jpg|jpeg|bmp)$
^/docs/.*\.(htm|html)$
- Colin_Walker_12Historic F5 AccountWhile this might be possible, I would think there would be quite a large performance penalty. Whenever you're talking about running a single regex, you're dealing with a fair amount of overhead, let alone multiple regexes on every incoming HTTP request.
- Actually, I got the word from one of the core developers that you cannot contain regular expressions in the datagroup in combination with matches_regex.
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