PlugContentSecurityPolicy v0.2.0 PlugContentSecurityPolicy View Source
A Plug module for inserting a Content Security Policy header into the response. Supports generating nonces as specified in CSP Level 2.
Link to this section Summary
Link to this section Functions
Link to this function
call(conn, config)
View Source
call(Plug.Conn.t(), Plug.opts()) :: Plug.Conn.t()
Callback implementation for Plug.call/2
.
Accepts the following options:
:directives
: Map of CSP directives with values as lists of strings:nonces_for
: List of CSP directive keys to generate nonces for:report_only
: Use thecontent-security-policy-report-only
header instead of thecontent-security-policy
header.
See README for usage details.