Skip to content
Start here

Precursor

Get Zone Precursor Config
client.Precursor.Get(ctx, params) (*PrecursorConfig, error)
GET/zones/{zone_id}/precursor
Update Zone Precursor Config
client.Precursor.Update(ctx, params) (*PrecursorConfig, error)
PUT/zones/{zone_id}/precursor
ModelsExpand Collapse
type PrecursorConfig struct{…}
Mode PrecursorConfigModeOptional

Controls Precursor detection for the zone. off disables detection, monitor records detections without affecting bot scores, and arm allows detections to affect bot scores.

One of the following:
const PrecursorConfigModeOff PrecursorConfigMode = "off"
const PrecursorConfigModeMonitor PrecursorConfigMode = "monitor"
const PrecursorConfigModeArm PrecursorConfigMode = "arm"
Rules []PrecursorConfigRuleOptional

The ordered list of Precursor rules for the zone.

Expression string

The filter expression that determines which requests the rule matches.

maxLength4000
ShowInterstitial bool

Whether Precursor shows an interstitial when it takes action on a request.

ID stringOptional

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

Description stringOptional

An informative description of the rule.

Enabled boolOptional

Whether the rule is active.

ShowInterstitial boolOptional

Whether Precursor shows an interstitial when it takes action on a request.