Regex Threat Protection Policy
The regex-threat-protection policy protects your APIs against malicious content patterns by evaluating request headers, URL path, query parameters, and payload body against a configured regular expression. When any part of the request matches the specified pattern, the policy rejects the request with a 400 status code and a relevant response string.
- This policy performs full regular expression matching.
- It has no content-type restriction and can inspect any part of the request (headers, URL path, query parameters, and request body) regardless of payload format.
Description
-
It evaluates request content against a configured regular expression pattern.
-
When any part of the request matches the configured pattern, the gateway blocks the request and returns a
400response. The backend does not receive the request. -
The following conditions trigger a rejection:
-
A request header name or value matches the configured regex (when
checkHeadersistrue). -
The URL path or a query parameter value matches the configured regex (when
checkPathistrue). -
The request body matches the configured regex (when
checkBodyistrue).
-