Forum Discussion
maximillean_953
Nimbostratus
May 27, 2014i write with not it applies true
when HTTP_REQUEST {
if { ([lindex [split [HTTP::path] "/"] 2] contains "control" ) or ( [lindex [split [HTTP::path] "/"] 3] contains "control" ) or ( [lindex [split [HTTP::path] "/"] 1] contain...
cjunior
Nacreous
May 27, 2014I think it is because 'or' overrides 'and'. Place parentheses: if { ( (1 eq 1) or (2 eq 2) ) and !(2 eq 1) } { reject }
Try:
when HTTP_REQUEST {
if { ( ([lindex [split [HTTP::path] "/"] 2] contains "control" ) or ( [lindex [split [HTTP::path] "/"] 3] contains "control" ) or ( [lindex [split [HTTP::path] "/"] 1] contains "sql" ) ) and ![class match [IP::client_addr] equals ss_allowed_address] } { 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
