Skip to main content
Feedback

Regex Threat Protection Policy

The regex-threat-protection policy extracts information from a request (headers, path, query parameters, body payload) and evaluates that content against pre-defined regular expressions. If any content matches the specified regular expression, the request is considered a threat and is rejected with a 400 BAD REQUEST.

Timing

On RequestOn Request Content
XX

Configuration

PropertyRequiredDescriptionTypeDefault
regexyesRegex is used to detect malicious injections. You can enable this regular expression on headers, path and body, or add multiple regex threat protection policies with a different regex.string
caseSensitivenoPerform case-sensitive matching. Note: Use with caution. Enabling case sensitive matching may miss some patterns such as DrOp TaBlE.booleanfalse
checkHeadersnoEvaluate regex on request headers.booleantrue
checkPathnoEvaluate regex on request path and query parameters.booleantrue
checkBodynoEvaluate regex on request body content.booleantrue

Errors

HTTP status code

CodeMessage
400Applies to matching request headers, matching request path or query parameters, matching request bod.
On this Page