Skip to content
Start here

Precursor

Get Zone Precursor Config
client.precursor.get(PrecursorGetParams { zone_id } params, RequestOptionsoptions?): PrecursorConfig { default_mode, enforcement_rules }
GET/zones/{zone_id}/precursor
Update Zone Precursor Config
client.precursor.update(PrecursorUpdateParams { zone_id, default_mode, enforcement_rules } params, RequestOptionsoptions?): PrecursorConfig { default_mode, enforcement_rules }
PUT/zones/{zone_id}/precursor
ModelsExpand Collapse
EnforcementRule { expression, mode, id, 2 more }
expression: string

The filter expression that determines which requests the rule matches.

mode: "min-friction" | "max-security"

The override mode Precursor applies to requests matching an enforcement rule. Unlike default_mode, this cannot be off.

One of the following:
"min-friction"
"max-security"
id?: string

The read-only identifier that Cloudflare assigns to the rule.

description?: string

An informative description of the rule.

enabled?: boolean

Whether the rule is active.

PrecursorConfig { default_mode, enforcement_rules }
default_mode?: "off" | "min-friction" | "max-security"

The zone-level Precursor enforcement mode applied to requests that do not match a more specific enforcement rule.

One of the following:
"off"
"min-friction"
"max-security"
enforcement_rules?: Array<EnforcementRule { expression, mode, id, 2 more } >

The ordered list of enforcement rules for the zone.

expression: string

The filter expression that determines which requests the rule matches.

mode: "min-friction" | "max-security"

The override mode Precursor applies to requests matching an enforcement rule. Unlike default_mode, this cannot be off.

One of the following:
"min-friction"
"max-security"
id?: string

The read-only identifier that Cloudflare assigns to the rule.

description?: string

An informative description of the rule.

enabled?: boolean

Whether the rule is active.