Documentation ¶
Overview ¶
Package csp provides simple tools to create and modify a Content Security Policy.
Index ¶
Constants ¶
View Source
const ( HeaderName = "Content-Security-Policy" None = "'none'" Self = "'self'" Data = "data:" ReportSample = "'report-sample'" StrictDynamic = "'strict-dynamic'" UnsafeEval = "'unsafe-eval'" UnsafeHashes = "'unsafe-hashes'" UnsafeInline = "'unsafe-inline'" )
CSP source values.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Policy ¶
Policy is a map of CSP directives. It's the same data structure as http.Header, with a different serialization.
Click to show internal directories.
Click to hide internal directories.