Forum Discussion
mikey_webb
Cirrus
Jan 07, 2015Help with pattern match irule required
Need help with an irule to drop the request if pattern is not matched. The link and pattern is always as below whereby only the values will change....such as vid, height, quality values etc
htt...
Michael_Jenkins
Cirrostratus
Jan 09, 2015You may be better off using a
switch statement for multiple patterns. something like this
when HTTP_REQUEST {
switch -glob -- [string tolower [HTTP::uri]] {
"/getimage.aspx\?vid=*usehttp=?&cat=*&class=*&size=*&resize=?&dpi=*&quality=*&type=*&width=*&height=*&id=*" -
"Insert another pattern here" {
Looks good. Do nothing
}
default {
Drop the request
drop
}
}
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