API Configuration Reference
Complete reference for the configuration JSON format used by the wizard API endpoints.
This page documents the JSON format used when reading or writing configuration via the wizard API (/wizard/core endpoints). Every field that appears in the UI wizard corresponds to a key in this format except for domains and origins which are managed on their own endpoints.
Duration strings
Fields marked as duration accept duration strings, composed of a number and a unit suffix:
| Suffix | Unit |
|---|---|
ms | milliseconds |
s | seconds |
m | minutes |
h | hours |
d | days |
w | weeks |
y | years |
Examples: "10s", "5m".
Top-level structure
{
"general": { },
"highAvailability": { },
"queryParams": { },
"headers": { },
"cookies": { },
"security": { },
"optimisation": { },
"overrides": [ ]
}
highAvailability and optimisation are optional — they are omitted entirely when the corresponding features are disabled.
general
| Field | Type | Required | Notes |
|---|---|---|---|
allowMethods | []string | yes | Allowed HTTP methods. Values: "GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "CONNECT", "OPTIONS", "TRACE" |
uncacheable | bool | yes | Disable caching entirely for this rule |
cacheableTTLOverride | string (duration) | no | Override TTL for cacheable responses. Omitted when not set |
errorCodeTTLOverride | string (duration) | no | Override TTL for error-code responses. Omitted when not set |
uncacheableTTL | string (duration) | yes | How long edge nodes remember that a response is uncacheable |
firstByteTimeout | string (duration) | yes | How long to wait for the first response byte from origin. Default "10s" |
websocket | string | yes | "disable" | "enable" | "exclusive" |
allowBodyWithGet | bool | yes | Allow GET requests that include a request body |
urlDecodeReserved | string | yes | "enabled" | "disabled" |
maxReqBodySize | string (bytes) | yes | Maximum request body size, e.g. "10m" for 10 MB |
chunkedBody.action | string | yes | "deny" | "allow" | "cache" |
sharding | object | no | Omitted when sharding is disabled |
sharding.hashSource | string | — | "url" | "client_ip" |
backendRetry | bool | yes | Retry with a different origin on 5xx responses |
urlRewrite | string | no | URL path to rewrite the request to, starting with /, e.g. "/index.html". Omitted when URL rewriting is disabled |
highAvailability
This key is optional — it is omitted entirely when no high-availability features are enabled.
| Field | Type | Required | Notes |
|---|---|---|---|
staleIfError | object | no | Omitted when stale-if-error is disabled |
staleIfError.keepStaleDuration | string (duration) | yes | How long to serve stale content while the origin is unavailable |
staleIfError.staleRevive | object | no | Omitted when stale-revive is disabled |
staleIfError.staleRevive.ttl | string (duration) | yes | How long to serve a background-refreshed stale object |
staleIfError.staleRevive.grace | string (duration) | yes | Extra time an object can be served stale during background refresh |
queryParams
| Field | Type | Required | Notes |
|---|---|---|---|
removeQueryParameters.action | string | yes | "off" | "redirect" | "continue" | "sort" |
Action values:
"off"— Query parameters are passed through unchanged with no processing."redirect"— Strip all query parameters and redirect the client to the cleaned URL."continue"— Strip all query parameters and continue serving from the cleaned URL without redirecting."sort"— Sort query parameters alphabetically to improve cache hit rates.
headers
| Field | Type | Required | Notes |
|---|---|---|---|
onAuthHeader.action | string | yes | "remove" | "pass" |
unsetHeadersForDelivery | []string | yes | Response headers to strip before delivery to the client. Max 5 entries |
hashHeaders | []string | yes | Request headers to include in the cache key. Max 5 entries |
setBackendHeaders | []{name, value} | yes | Headers to add to requests sent to the origin. Max 5 entries |
setHeadersForDelivery | []{name, value} | yes | Headers to add to responses delivered to the client. Max 5 entries |
trueClientIp | bool | yes | Forward the original client IP as True-Client-IP to the origin |
cookies
cookies.onCookie
Controls how incoming request cookies are handled. Exactly one of action or allowList is present — they are mutually exclusive.
| Field | Type | Notes |
|---|---|---|
action | string | "pass" — pass all cookies to the origin. "remove" — strip all cookies. Mutually exclusive with allowList |
allowList | []string | Cookie names to keep; all others are stripped. Max 5 entries. Mutually exclusive with action |
cookies.onSetCookie
Controls how Set-Cookie response headers from the origin are handled. Exactly one of action, allowList, or denyList is present.
| Field | Type | Notes |
|---|---|---|
action | string | "pass" — pass all Set-Cookie headers to the client. "remove" — strip all Set-Cookie headers. Mutually exclusive with allowList and denyList |
allowList | []string | Cookie names whose Set-Cookie headers are kept; all others are stripped. Mutually exclusive with action and denyList |
denyList | []string | Cookie names whose Set-Cookie headers are stripped; all others pass through. Mutually exclusive with action and allowList |
security
| Field | Type | Required | Notes |
|---|---|---|---|
httpsRedirect | bool | yes | Redirect HTTP requests to HTTPS |
hsts | bool | yes | Add the Strict-Transport-Security header |
botVerifySettings | string | yes | "disabled" | "enabled" |
hotlinkProtection | object | no | Omitted when hotlink protection is disabled |
hotlinkProtection.friends | []string | yes | Hostnames permitted to embed your resources |
asnFilter | object | no | Omitted when ASN filtering is disabled |
asnFilter.allowVerifiedBots | bool | yes | Allow verified search engine bots through the ASN filter |
asnFilter.action | string | yes | HTTP status code returned for blocked requests: "403" | "404" | "429" |
asnFilter.type | string | yes | "country_deny_list" | "country_allow_list" | "asn_deny_list" | "asn_allow_list". Determines which of the four list fields below is present |
asnFilter.countryDenyList | []string | no | Two-letter country codes to block. Mutually exclusive with the other three list fields |
asnFilter.countryAllowList | []string | no | Only allow traffic from these countries. Mutually exclusive with the other three list fields |
asnFilter.asnDenyList | []string | no | ASN numbers to block. Mutually exclusive with the other three list fields |
asnFilter.asnAllowList | []string | no | Only allow traffic from these ASNs. Mutually exclusive with the other three list fields |
botProtection | object | no | Omitted when standard bot protection is disabled |
botProtection.mode | string | yes | "captcha" | "pow" | "both". Default "both" |
botProtection.captchaTtl | string (duration) | no | How long a visitor stays cleared after solving the Captcha challenge. Default "1h". Present only when botProtection.mode is "captcha" or "both" |
waf | object | no | Omitted when WAF is disabled |
waf.mode | string | yes | "detect" — log only, do not block. "deny" — block matching requests |
waf.owasp | bool | yes | Enable the OWASP Core Rule Set |
waf.atomic | bool | yes | Enable the Atomicorp advanced rule set |
waf.skipRuleId | []string | yes | Rule IDs to exempt from enforcement |
waf.bypass.enable | bool | yes | Enable WAF bypass ACL |
waf.bypass.acl | []string | yes | IP addresses or CIDR ranges that bypass WAF inspection |
allowList.enable | bool | yes | Enable IP allow list |
allowList.acl | []string | yes | IP addresses or CIDR ranges that are exclusively allowed |
denyList.action | string | no | Status code for blocked requests: "400" | "403" | "404". Omitted when the deny list is disabled |
denyList.acl | []string | yes | IP addresses or CIDR ranges that are blocked |
ratelimit | object | no | Omitted when rate limiting is disabled |
ratelimit.clientRate | float | yes | Token refill rate (tokens/second) for client requests |
ratelimit.clientCreditLimit | string (duration) | yes | Maximum time worth of tokens that can accumulate for client requests |
ratelimit.fetchRate | float | yes | Token refill rate (tokens/second) for backend fetch requests |
ratelimit.fetchCreditLimit | string (duration) | yes | Maximum time worth of tokens that can accumulate for backend fetch requests |
optimisation
This key is optional — it is omitted entirely when WebP image optimisation is disabled.
| Field | Type | Required | Notes |
|---|---|---|---|
imageopt.quality | int | yes | JPEG/WebP quality level, 0–100 |
imageopt.imagetrans | object | no | Omitted when image transformation is disabled |
imageopt.imagetrans.widthParam | string | yes | Query parameter name used to request a specific image width |
imageopt.imagetrans.heightParam | string | yes | Query parameter name used to request a specific image height |
imageopt.imagetrans.allowedDimensions | []string | yes | Permitted widthxheight dimension pairs, e.g. "800x600" |
imageopt.imagetrans.allowedWidths | []string | yes | Permitted width values |
imageopt.imagetrans.allowedHeights | []string | yes | Permitted height values |
overrides
An array of rules that override specific settings for requests matching a given path or file extension. Each rule in the array is an object with the following fields:
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | yes | Human-readable label for the rule |
paths | []string | either/or | URL path patterns to match, e.g. "/api/", "^/admin/settings". Mutually exclusive with extensions |
extensions | []string | either/or | File extension patterns to match, e.g. "jpg", "css". Mutually exclusive with paths |
rules | []object | yes | List of field overrides to apply when this rule matches |
Exactly one of paths or extensions must be non-empty — they are mutually exclusive. A rule matches by path or by extension, not both.
Override rule entries
Each entry in the rules array overrides one wizard field for requests that match the override:
| Field | Type | Notes |
|---|---|---|
stringId | string | The dot-notation field identifier, matching the same IDs used in the main configuration (e.g. "general.uncacheable", "cookies.onCookie.action") |
value | any | The value to apply, in the same format as the corresponding field in the main config |
The value type must match the field type:
- Boolean fields:
trueorfalse - String/select fields: a string, e.g.
"remove"or"deny" - Array fields: a JSON array of strings, e.g.
["session", "cart"] - Table fields (
setBackendHeaders,setHeadersForDelivery): an array of{"name": "...", "value": "..."}objects
Matching and precedence
- Overrides are evaluated in the order they appear in the array.
- If a request matches multiple overrides, only the first matching override is applied.
pathsandextensionsare mutually exclusive. Only one should be non-empty per rule.- Paths support a leading
^regex character so that a path of/api/will match/v1/api/endpointbut^/api/would not.
Example
{
"overrides": [
{
"name": "Cache static assets for 30 days",
"paths": [],
"extensions": ["jpg", "png", "webp", "css", "js"],
"rules": [
{ "stringId": "general.uncacheable", "value": false },
{ "stringId": "general.cacheableTTLOverride", "value": "30d" }
]
},
{
"name": "API passthrough — no caching, no cookies stripped",
"paths": ["/api/"],
"extensions": [],
"rules": [
{ "stringId": "general.uncacheable", "value": true },
{ "stringId": "cookies.onCookie.action", "value": "pass" }
]
},
{
"name": "Admin area — allow list only",
"paths": ["/admin/"],
"extensions": [],
"rules": [
{ "stringId": "security.allowList.enable", "value": true },
{ "stringId": "security.allowList.acl", "value": ["10.0.0.0/8", "192.168.1.0/24"] }
]
}
]
}
Overrides
Rules based on path or file-type to apply different behaviors to different parts of your site.
Managing TLS Certificates
Secure your traffic with Managed TLS via Let’s Encrypt or by uploading your own custom certificates. Ensure encrypted communication for your users with automated issuance and renewal.