Documentation
¶
Index ¶
Constants ¶
View Source
const ( CSPDirectiveDefaultSrc = "default-src" CSPDirectiveConnectSrc = "connect-src" CSPDirectiveChildSrc = "child-src" CSPDirectiveScriptSrc = "script-src" CSPDirectiveFontSrc = "font-src" CSPDirectiveStyleSrc = "style-src" CSPDirectiveObjectSrc = "object-src" CSPDirectiveManifestSrc = "manifest-src" CSPDirectiveFrameSrc = "frame-src" CSPDirectiveImgSrc = "img-src" CSPDirectiveReportURI = "report-uri" CSPDirectiveFormAction = "form-action" CSPDirectiveMediaSrc = "media-src" CSPFrameAncestors = "frame-ancestors" )
Variables ¶
This section is empty.
Functions ¶
func ShouldCacheFile ¶ added in v0.6.1
Types ¶
type CSPDirectives ¶ added in v0.6.1
type CSPDirectives map[CSPFetchDirective][]string
CSPDirectives is a map of all csp fetch directives to their values. Each directive is a set of values that is joined by a space (' '). All directives are semi-colon separated as a single string for the csp header.
func (CSPDirectives) Append ¶ added in v0.6.1
func (s CSPDirectives) Append(d CSPFetchDirective, values ...string)
type CSPFetchDirective ¶ added in v0.6.1
type CSPFetchDirective string
CSPFetchDirective is the list of all constant fetch directives that can be used/appended to.
Click to show internal directories.
Click to hide internal directories.