Skip to main content

Reference: all rule types and fields

Quick reference page: a summary of every rule type, operator and condition, count limit, and edge processing order for the org_admin role. Each individual guide explains these in more detail.

This page brings together all rule and configuration types, operators and conditions, unsupported fields and actions, the processing order, and the limits (caps) for the org_admin role. Each individual guide (Cache, Access Control, Rate Limit, and so on) explains these in more detail; this page is for quick lookup.

Error code convention on save (validation failure): all data validation errors return 400 Bad Request (with a list of errors per field). A JSON body with the wrong type, missing required fields, or unknown fields (on APIs that reject unknown fields) is rejected with 422 Unprocessable Entity. Exceeding a count cap usually returns 400; some sections return 409 Conflict or 403 (noted in the table).


Table: all rule and configuration types​

#Type (display name)Section (API)Count capPriority semanticsActionsFailure code
1Upstream / Originupstreamurls ≤64 (no cap on rule count)By selector order / failover— (no rule actions)400
2Cache Settingscache— (1 configuration per domain)——400
3Cache Policycache-policies≤100Lower number = higher priority, first-matchresponse_headers.action: set, remove, delete400
4Rate Limitrate-limitRules ≤100Lower number runs first, first-match""/429 → 429 · timed_block → 403 + timed block · challenge (JS Challenge, requires By IP) → challenge page for page navigations, otherwise 429400
5Access Controlaccess-controlGeo ≤50 · asn ≤50 · ip ≤200First-match by priority (lower number wins; tie → deny wins)allow, deny (allow skips the later security checks: WAF, X-Vtoken, Token V2)400
6Token V2 (HMAC URL signing)access-control.token_v2Rules ≤50By the rule's priority— (signature verification) · invalid/missing/expired token → 403400 (nested in access-control)
7X-Vtokenvtoken + /vtoken/keysKeys: active ≤10, total ≤50 (→409)—Token verification (header X-Vtoken or ?x-token=, header wins) · missing/invalid/replay/ip-mismatch → 403 (on required paths; exempt/whitelist still pass) · expired → 410400
8WAFwaf— (requires WAF entitlement)Custom rules: priority −1000..1000Custom rules: block, log, allow400 (no WAF entitlement 403)
9WAF AI Profile / Overridewaf (ai-profiles + ai-overrides)Overrides 500/domain (→403) · enabled_rule_ids/score_overrides ≤8192—Override actions: block, monitor, off, shadow (same as monitor)400 (duplicate name →409)
10Firewall Rulesfirewall-rules200/domain (→409)Lower number runs first (default 100, 0–10000)block, allow, log, bypass, redirect, timed_block, managed_challenge (challenge/js_challenge = aliases; clients that cannot run JS → Block 403 by default, or Allow; Block on a rule that matches every request → 422; a later matching block/timed_block rule still applies) · Not supported (400): rate_limit, rewrite, wait_page (*allow/bypass skip the WAF)400 · more than 200 rules 409
11Adaptive Rulesadaptive-rules100/domainpriority 0–10000; window 5–86400CRUD + master enable + bulk toggle400
12Bot Detectionbotcustom_block_patterns ≤128—Block/allow by bot type403 without WAF entitlement
13Bot Management / Challengebot-mgmtbypass_cidrs ≤256 · path_rules ≤128Escalates by level 1/2/3 thresholdsLevel 1 → JS challenge · Level 2 → JS challenge + proof-of-work · Level 3 → 403403 without WAF entitlement
14DDoS (beta)ddos——mode: "" (default)/shadow/enforce—
15ATSats19 tuning fields—— (scoring; 0/0.0 = use the default)400
16Redirectsredirects≤100Lower number runs first (by priority)status_code ∈ {301,302,307,308}400
17Error Pageserror_pagespages map (keys 400–599)Per-domain → organization template → global → built-in—400
18Origin Rewriteorigin-rewrite≤100First-match by priority (lower number first)— (rewrites path/origin)400
19Header Rulesheader-rules— (no count limit)Not first-match: the edge applies every matching rule in descending priority order (higher numbers run first, lower numbers run last → win when they set the same header); the UI lists them in ascending orderset, append, remove400
20CORScors≤50Lower number runs first (by priority), first-match— (generates CORS headers)400
21Security Headerssecurity-headerscustom_headers ≤50—— (adds/overwrites headers)400
22Image Optimizationimage-optimizationRules ≤50Rules: lower number = firstoutput_format per rule400
23TLStls——min_version, HSTS, auto-redirect400
24Compressioncompression——algorithms ⊆ {gzip,br,zstd,deflate}400
25Timeoutstimeouts——— (null = inherit)400
26Purge / Warmpurge / warmPurge values ≤100 · warm urls ≤1000—Purge mode: url/prefix/suffix/tag/allCount limit exceeded →400; organization quota (per-request / daily) →429
27Hotlink protection(no dedicated feature)——Done with X-Vtoken / Token V2 / Access-Control / a referer condition in Header/Firewall rules—

Operators and conditions (rules with conditions)​

General principle: within one group → conditions are combined with AND; between groups (different condition_group) → combined with OR. Multiple values within one condition are also usually OR.

RuleCondition fields (field)Operators (operator)Group logiccondition_group range
Cache Policy (cache-policies)url_path, query_string, method, hostname, user_agent, cookie, origin, via, ip_sourceequals (+icase/not), regex, starts_with/ends_with (+icase/not), contains/contains_icase (API only, not in the UI)AND within a group / OR between groups— (empty conditions = match all)
Rate Limit match_conditionsPer match_conditions (≤32 per rule)(rate-limit field/operator set)AND within a group / OR between groups0–7
Firewall Rulesfield (including ja4 = API only, no UI dropdown)operator; flags negate, case_insensitive, transformations ≤8AND within a group / OR between groups; 1–64 conditions; value ≤40960–15
Adaptive RulesGET /adaptive-rules/fields(adaptive field/operator set)AND within a group / OR between groups0–7
Redirectsconditions[] 1–20Regex (captures $1..$9 usable in destination_url)First-match by priority (lower number first)—
Origin Rewritematch_type: prefix*, exact, suffix, contains, wildcard, regex; match_hostnames ≤20By match_typeFirst-match by priority (lower number first)—
Header Rulescondition (rule expression)Expression——
WAF Custom rulesexpression (rule expression)Expression——
Token V2conditions[] ≤20(path/request match conditions)——

Rules without compound conditions (simple matching): CORS (path_pattern + match_type exact/prefix/regex), Image-Opt (match_extensions + match_type), Access-Control (matches by IP/Geo/ASN + match_hostnames ≤20).


Unsupported fields and actions​

Field or actionBelongs toStatus
connection_pool_sizeUpstream (per-domain)Not supported per domain
keepalive_secsTimeoutsNot supported per domain (websocket_idle_secs is supported)
block_duration_secsBot Management (bot-mgmt)Not supported
whitelist_asnsATSNot supported in ATS — set exempt ASNs in the DDoS section
threshold_overrideWAF AI ProfileNot supported — saving returns 422
rate_limit, rewrite, wait_pageFirewall Rules (actions)Not supported — saving returns 400
block (no timer)Rate Limit (action)Not supported — use timed_block to block for a period

Processing order (edge)​

Requests pass through the features in this order:

  1. Verified bots
  2. CORS preflight
  3. Access Control — a matching allow skips all later security checks (WAF, X-Vtoken, Token V2)
  4. X-Vtoken
  5. Token V2
  6. Redirects
  7. Bot Management (bot-mgmt)
  8. Rate limit
  9. DDoS / ATS
  10. Firewall Rules — the allow/bypass actions skip the other security checks (Rate Limit, Bot Management, DDoS, WAF); X-Vtoken and Token V2 still apply
  11. WAF: managed rules → custom rules → AI rules
  12. Bot Detection

Remember: Access Control allow skips every security check after it (including X-Vtoken and Token V2). Firewall allow/bypass skips the other security checks (Rate Limit, Bot Management, DDoS, WAF), but X-Vtoken and Token V2 still run. Verified bypass (verified bots) only skips Bot Management/Managed Challenge + Rate Limit, and does not skip the WAF. Cache-policy precedence: rule > domain > global.


Important limits (caps)​

ObjectCapWhen exceeded
Cache Policy100Save error
Rate Limit rules100Save error
Redirects100Save error
Origin Rewrite100Save error
Firewall Rules200/domain409
Adaptive Rules100/domainSave error
Access Control — Geo rules50Save error
Access Control — ASN rules50Save error
Access Control — IP rules200Save error
CORS rules50Save error
Image Optimization rules50Save error
Token V2 rules50Save error
X-Vtoken keysActive ≤10 / total ≤50409
WAF AI Override500/domain403
WAF AI enabled_rule_ids / score_overrides≤8192 eachSave error
Upstream urls≤64 (each ≤2048) · origin_headers ≤50Save error
Cache status_ttl map≤500 entriesSave error
Cache-key header_include/cookie_include≤16 each · Vary allowlist ≤8Save error
Bot Mgmt bypass_cidrs / path_rules≤256 / ≤128Save error
Bot Detection custom_block_patterns≤128Save error
Security Headers custom_headers≤50Save error
Purge values / Warm urls≤100 / ≤1000Save error

Important notes and unusual behavior​

  • The WAF Workspace has 5 tabs: Overview · Access tokens · Rules · Traffic defense · Events.
  • Firewall condition_group accepts values 0–15.
  • Quota is read-only for org_admin. Setting, editing, or resetting quotas (both Traffic and Purge/Warm) returns 403 for org_admin, and the UI does not show the quota panels; you can read the quota of your own organization through the API (sub-organizations → 403).
  • Broad CIDRs are blocked in every whitelist/allow: an allow/bypass CIDR broader than v4 /8 or v6 /16 is rejected (400) — including 0.0.0.0/0, 0.0.0.0/1, ::ffff:0.0.0.0/96 (not just /0). This applies to: Access-Control IP allow, Token V2 whitelist, X-Vtoken whitelist_ips, Bot-Mgmt bypass_cidrs, Rate-Limit bypass_ips, Firewall IP allow/bypass. (DDoS whitelist_ips is separate: v4 /8–/32, v6 /16–/128.)

Unusual behavior to remember​

  • Lower priority number runs first, first-match: CORS, Firewall, Cache Policy, WAF custom, Image Optimization, Redirects, Origin Rewrite, Rate Limit. Access Control: lower number wins, tie → deny wins.
  • Header Rules: not first-match — the edge applies every matching rule in descending priority order (lower numbers run last and win for the same header); the UI lists them in ascending order.
  • Cache Policy priority: lower number = higher priority, first-match.
  • Firewall block_status_code: set it explicitly; the UI pre-fills 429, and 403 is used when no value is saved.
  • TLS min_version: selecting 1.0/1.1 is still raised to a minimum of 1.2 (PCI). HTTP/3 to a domain with H3 disabled → 421.
  • contains/contains_icase (Cache Policy) are only available in the API, not in the UI.
  • ja4 (Firewall) is API only, with no UI dropdown.
  • Cache Policy origin_response_headers[] is a separate list (≤20 per rule), distinct from response_headers[]: it provides the "remove Set-Cookie to make responses cacheable" and "strip Vary → single-variant" features. remove Vary returns 400 if the rule is a catch-all or has a non-empty vary_headers.

Common terms​

TermShort meaning
EdgeVNIS edge servers located close to users — where cache and security are handled before (if needed) contacting the origin.
Origin / UpstreamYour origin server, which holds the actual content; the edge fetches content from it when the cache does not have it yet.
CNAMEA DNS record that points your domain to VNIS so traffic goes through the CDN.
TTLHow long content is considered "fresh" in the cache before it must be fetched again from the origin.
HIT / MISSHIT = the cache can serve the content immediately; MISS = the cache does not have it and must fetch it from the origin.
Purge / WarmPurge = remove content from the cache; Warm = preload content into the cache for faster delivery.
SWR (stale-while-revalidate)Temporarily serve the old copy while quietly fetching a new one in the background.
WAFWeb application firewall — filters malicious requests (SQLi, XSS, and so on).
CIDRNotation for an IP address range, for example 203.0.113.0/24.
ASNA number that identifies a network or Internet provider.
HSTSA header that tells browsers to access the domain only over HTTPS.
ACMEA protocol for automatically issuing free SSL certificates (Let's Encrypt, ZeroSSL).
First-matchWhen several rules match, the system evaluates them in priority order and stops at the first matching rule.
Rule priorityA rule's priority; in many features lower number = higher priority.

If you notice differences from what you see on screen, please let us know so we can update this page.