Forum Discussion
Snl
Cirrostratus
Oct 18, 2018Irule help
Folks
I have requirement to the request start with /abc/ directory and contains the parameter si or di
the value of this parameter should not exceed more than 50 characters , if exceed should dr...
Kevin_Stewart
Employee
Oct 18, 2018You'll want to create static variables in RULE_INIT to maintain CMP.
when RULE_INIT {
set static::DEBUG 1
set static::sec_http_max_post_data_length 50
}
when HTTP_REQUEST {
if { ( [string tolower [HTTP::uri]] equals "/abc/" ) and ( [HTTP::method] equals "POST" ) } {
set len [HTTP::header "Content-Length"]
if { [expr {$len > $static::sec_http_max_post_data_length}] } {
log local0. " SEC-ALERT: POST Length: uri=[HTTP::uri]; len=$len; max_len=$static::sec_http_max_post_data_length"
reject
}
}
}
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