MCPcopy Create free account
hub / github.com/Kong/insomnia / withRule

Method withRule

packages/insomnia/src/scripting/sandbox.ts:262–264  ·  view source on GitHub ↗
(rule: ThreatRule)

Source from the content-addressed store, hash-verified

260
261 // returns a policy with `rule` appended (immutable).
262 withRule(rule: ThreatRule): ScriptSecurityPolicy {
263 return new ScriptSecurityPolicy([...this.rules, rule]);
264 }
265
266 // returns a policy with the named rule removed (immutable).
267 withoutRule(name: string): ScriptSecurityPolicy {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected