csp

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2025 License: BSD-3-Clause, GPL-3.0, MIT, + 1 more Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InlineScript inlineKind = iota
	InlineStyle
)

Variables

This section is empty.

Functions

func PatchHeaders

func PatchHeaders(res *http.Response, kind inlineKind) (string, error)

PatchHeaders mutates CSP headers and meta tags so an inline <script> or <style> element can run. Returns the nonce to place on the inline tag. The nonce is safe to inject unconditionally.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL