Forum Discussion
incorrect condifiton if
the previews version
if { $http_path contains ".jsp" } { drop }
the new version i add class
if { $http_path contains ".jsp" && [class match $http_path not contains class_jsp_allowed] } { drop }
but its incorrect how can i correct this the errer message parse error: missing close-brace: possible unbalanced brace in comment] [{ set http_path [URI::decode [string tolower [HTTP::path]]] Custom 403 denied access page set html_error_message_head { <
i need to use class and with the condition $http_path contains ".jsp" thanks in advance
4 Replies
i get a different error, don't believe you can do "not contains" so that probably becomes ![ ... ]
are you sure the error you get is caused by this line itself, not the context?
- nitass
Employee
e.g.
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule qux ltm rule qux { when HTTP_REQUEST { set http_path [HTTP::path] if { $http_path contains ".jsp" && not([class match $http_path contains class_jsp_allowed]) } { drop } } } - rezgui_180607
Nimbostratus
so not contains will be (!contains) is that correct
($http_path contains ".jsp" && $http_path ! contains "sample.jsp" )
- no, please do what nitass shows.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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