Skip to content

JsonThreatProtectionConfig

Defined in: src/policies/traffic/json-threat-protection.ts:15

Configuration for the jsonThreatProtection policy.

optional contentTypes: string[]

Defined in: src/policies/traffic/json-threat-protection.ts:31

Content types to inspect. Requests with other content types pass through without inspection. Default: ["application/json"].


optional maxArraySize: number

Defined in: src/policies/traffic/json-threat-protection.ts:23

Maximum array length. Default: 100.


optional maxBodySize: number

Defined in: src/policies/traffic/json-threat-protection.ts:25

Maximum raw body size in bytes. Checked BEFORE parsing. Default: 1048576 (1 MB).


optional maxDepth: number

Defined in: src/policies/traffic/json-threat-protection.ts:17

Maximum nesting depth. Default: 20.


optional maxKeys: number

Defined in: src/policies/traffic/json-threat-protection.ts:19

Maximum number of keys per object. Default: 100.


optional maxStringLength: number

Defined in: src/policies/traffic/json-threat-protection.ts:21

Maximum string value length (also applies to object keys). Default: 10000.


optional skip: (c) => boolean | Promise<boolean>

Defined in: src/policies/types.ts:90

Skip this policy when condition returns true

unknown

boolean | Promise<boolean>

PolicyConfig.skip