SecurityConfig constructor
const
SecurityConfig({})
Creates a configuration. Defaults to a 1 MB payload limit and block/flag thresholds of 0.8/0.5.
Implementation
const SecurityConfig({
this.maxPayloadSize = 1024 * 1024, // 1 MB
this.blockThreshold = 0.8,
this.flagThreshold = 0.5,
}) : assert(maxPayloadSize > 0, 'maxPayloadSize must be positive'),
assert(
flagThreshold <= blockThreshold,
'flagThreshold must be <= blockThreshold',
);