Skip to main content
Feedback

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.

note
  • 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 400 response. The backend does not receive the request.

  • The following conditions trigger a rejection:

    • A request header name or value matches the configured regex (when checkHeaders is true).

    • The URL path or a query parameter value matches the configured regex (when checkPath is true).

    • The request body matches the configured regex (when checkBody is true).

On this Page