WAF settings reference

Every WAF-related edge setting of a zone or name: values, defaults and how the edge uses them.

On this page

These fields are part of a zone's edge settings (GET/PATCH /v1/orgs/{org}/zones/{zone}/edge). A PATCH changes only the fields you send; nested objects merge field by field and lists are replaced whole. Every field except redirects can also be set for one name under hosts.<name> (see Per-name settings).

FieldTypeDefaultMeaning
modeactive, log, offactiveWAF mode.
waf_leveloff, low, medium, highmediumWAF level.
stackgeneric, wordpress, nextjs, staticgenericApplication.
enable_feedbooleantrueBlock addresses of the threat feeds.
rate_limit_rpminteger ≥ 00Basic rate limit per IP and minute; 0 = off.
rate_ruleslist, at most 25[]Rate limiting rules; see fields.
access_gateobjectoffAccess gate: enabled, path, ttl_hours, emails.
block_page_modebranded, nginx, apache, generic, custombrandedBlock page.
block_page_htmlstring, at most 256 KiB""HTML of the custom block page.
fake_server_headerstring""Value of the Server header; empty = nginx.
max_body_mbinteger ≥ 00Largest request body in MB; larger requests get 413. 0 = the edge default.
timeout_msinteger ≥ 00How long the edge waits for the origin, in milliseconds. 0 = the edge default.
redirect_allow_hostslist of hosts[]Extra hosts the open redirect shield accepts.
cors_allow_originslist of hosts[]Sister domains whose reflected CORS origins are kept (see CORS).
compressionbooleanfalseCompress text responses that the origin sends uncompressed (gzip, Brotli).

redirect_allow_hosts

Each entry is a lower-case host name (partner.example.net), localhost, an IPv4 address or a bracketed IPv6 address ([2001:db8::1]). A host name matches itself and its subdomains; an address matches only itself. Wildcards are not accepted.

cors_allow_origins

Each entry is a lower-case host name, without scheme or port (app.example.net). It matches itself and its subdomains. Duplicates are rejected.

Other edge settings

FieldDocumented in
origin, hstsSSL/TLS
redirectsRedirect rules
hostsPer-name settings
ai_agentsAI Crawl Control settings
cache, early_hintsCache
rumAnalytics

Validation

An invalid value is rejected with 422 and a message that names the field, for example rate_rules[0].path_prefix: … or hosts.www.example.com.rate_rules[1].hosts: …. Nothing is applied.

Last updated:

↑↓ to navigate↵ to openesc to close