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
DefaultSrc
BaseUri
ChildSrc
ConnectSrc
FontSrc
FormAction
FrameAncestors
FrameSrc
ImgSrc
ManifestSrc
MediaSrc
ObjectSrc
PluginTypes
ReportTo
ReportUri
RequireTrustedTypesFor
Sandbox
ScriptSrc
ScriptSrcAttr
ScriptSrcElem
StyleSrc
StyleSrcAttr
StyleSrcElem
TrustedTypes
UpgradeInsecureRequests
WorkerSrc
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
boolisStandAlone()
Determines whether the current directive can be used without any values, like for instance `sandbox`, `trusted-types` or `upgrade-insecure-requests`.
public
isStandAlone() : bool