Documentation
¶
Index ¶
Constants ¶
View Source
const ( Script tagKind = iota Style )
Variables ¶
This section is empty.
Functions ¶
func NewNonce ¶ added in v1.3.0
func NewNonce() string
NewNonce generates a cryptographically random nonce for CSP.
func PatchHeadersBatch ¶ added in v1.3.0
func PatchHeadersBatch(res *http.Response, operations []PatchOperation) error
PatchHeadersBatch mutates CSP headers and meta tags for multiple resources in a single pass.
Types ¶
type PatchOperation ¶ added in v1.3.0
PatchOperation represents a single CSP patch with its nonce and target resource.
Click to show internal directories.
Click to hide internal directories.