WAF exceptions

Switch off one WAF rule, every WAF rule or one shield on a path when it blocks legitimate traffic, without lowering the level for the whole site.

On this page

A WAF exception is a rule of kind waf_exception: a rule_id and a path_pattern, optionally limited to some names of the zone. On matching paths, that rule adds no points to the anomaly score; the other rules that matched the same request still count.

Find the rule id

Open the blocked (or, in log-only mode, logged) request in security events. Its rule_id is the WAF rule that decided it, for example 942100 (a CRS SQL injection rule), 10002 (an OpenWAF rule) or 1003 (the open redirect shield).

Values of rule_id

rule_idEffect on the path
0Every WAF rule (OWASP CRS and OpenWAF's rules). Not the shields.
1001–1008That shield only.
any other idThat rule only.

Values of path_pattern

path_patternMatches
empty or *every path
ends in *, e.g. /api/upload/*every path that starts with /api/upload/
anything else, e.g. /contactexactly that path

The path is compared without the query string, after cleaning // and . segments.

Add an exception

Domain → Security → Firewall → Rules → WAF exceptions → Add WAF exception. Enter the WAF rule (0, a shield id or the rule id), the Path, optionally the names it Applies to and a Note.

Add hosts (hosts:='["shop.example.com"]' in the CLI) to limit the exception to some names. Rules can't be edited: remove the rule and add it again.

Last updated:

↑↓ to navigate↵ to openesc to close