Hwaro::Models::CspConfig
[csp] — a Content-Security-Policy built from each page's inline
script/style hashes. Hashing, policy assembly and emission live in
Core::Build::Csp. See docs/content/features/csp.md.
Constants
DEFAULT_DIRECTIVES = {"default-src" => "'self'", "script-src" => "'self'", "style-src" => "'self'", "img-src" => "'self' data:", "font-src" => "'self'", "connect-src" => "'self'", "object-src" => "'none'", "base-uri" => "'self'", "frame-ancestors" => "'self'"}
The policy used for anything [csp.directives] leaves unset.
VALID_MODES = ["headers", "meta"] of ::String
Instance methods
directives
[csp.directives], in config order. Merged over DEFAULT_DIRECTIVES
by Core::Build::Csp; an empty value removes a default directive
(or, for any other name, is a valueless one: upgrade-insecure-requests).
[csp.directives], in config order. Merged over DEFAULT_DIRECTIVES
by Core::Build::Csp; an empty value removes a default directive
(or, for any other name, is a valueless one: upgrade-insecure-requests).
enabled
Sourceheaders_file=(headers_file : String)
Output-root-relative path of the headers file (headers mode).
meta?
Sourcereport_only
Source