Skip to content

JsonThreatProtectionConfig

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

Configuration for the jsonThreatProtection policy.

optional contentTypes: string[]

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

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:22

Maximum array length. Default: 100.


optional maxBodySize: number

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

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:16

Maximum nesting depth. Default: 20.


optional maxKeys: number

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

Maximum number of keys per object. Default: 100.


optional maxStringLength: number

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

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


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

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

Skip this policy when condition returns true

unknown

boolean | Promise<boolean>

PolicyConfig.skip