Directive : string

Representation of Content-Security-Policy directives see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy#directives

Table of Contents

Cases

BaseUri  = 'base-uri'
ChildSrc  = 'child-src'
ConnectSrc  = 'connect-src'
DefaultSrc  = 'default-src'
FontSrc  = 'font-src'
FormAction  = 'form-action'
FrameAncestors  = 'frame-ancestors'
FrameSrc  = 'frame-src'
ImgSrc  = 'img-src'
ManifestSrc  = 'manifest-src'
MediaSrc  = 'media-src'
ObjectSrc  = 'object-src'
PluginTypes  = 'plugin-types'
ReportTo  = 'report-to'
ReportUri  = 'report-uri'
RequireTrustedTypesFor  = 'require-trusted-types-for'
Sandbox  = 'sandbox'
ScriptSrc  = 'script-src'
ScriptSrcAttr  = 'script-src-attr'
ScriptSrcElem  = 'script-src-elem'
StyleSrc  = 'style-src'
StyleSrcAttr  = 'style-src-attr'
StyleSrcElem  = 'style-src-elem'
TrustedTypes  = 'trusted-types'
UpgradeInsecureRequests  = 'upgrade-insecure-requests'
WorkerSrc  = 'worker-src'

Methods

getAncestors()  : array<int, self>
isMutationReasonable()  : bool
Determines whether a mutation for the current directive would be reasonable.
isStandAlone()  : bool
Determines whether the current directive can be used without any values, like for instance `sandbox`, `trusted-types` or `upgrade-insecure-requests`.

Cases

Methods

getAncestors()

public getAncestors() : array<int, self>
Return values
array<int, self>

isMutationReasonable()

Determines whether a mutation for the current directive would be reasonable.

public isMutationReasonable() : bool

For instance, changing the default-src or report-uri would not qualify.

Return values
bool

isStandAlone()

Determines whether the current directive can be used without any values, like for instance `sandbox`, `trusted-types` or `upgrade-insecure-requests`.

public isStandAlone() : bool
Return values
bool

        
On this page

Search results