Forum Discussion
veredgf_96123
May 22, 2018Nimbostratus
irule to limit parameter and it's values on certain URL
Hi,
I need help with an iRule for the following situation -
This specific ASM policy has no URL limits (set to WC), but there is a certain URL that we need to have enabled only for the fol...
Yann_Desmarest
Sep 28, 2018Cirrus
Hi,
You can insert an irule within HTTP or ASM events to make sure that your requirement is respected :
when HTTP_REQUEST {
if { [HTTP::path] eq "/x/y/z" } {
set param1 [URI::query [HTTP::uri] param1]
set param_array [split [regsub -all {&=|&$} [URI::decode [URI::query [HTTP::uri]]] {}] "&"]
set param_count [llength $param_array]
if { !(($param1 eq "value1" or $param1 eq "value2") and ($param_count == 1)) } {
drop, reject, generate ASM violation, ...
}
}
}
Regards
Yann
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