Outerfaces.Odd.Plugs.OddCDNConsumerContentSecurityPlug (Outerfaces Dependency Distribution (ODD) v0.2.5)
View SourceA plug for setting Content Security Policy headers on responses. To configure the CSP, pass a map of key-value pairs to the plug.
Supports two modes:
use_self_policy: true- Simple 'self' based policy for unified proxy modesource_host_options: [...]- Explicit allowed sources list (default)
Summary
Functions
@spec call(Plug.Conn.t(), Keyword.t()) :: Plug.Conn.t()
@spec generate_nonce() :: String.t()
@spec maybe_inject_nonce(Plug.Conn.t()) :: Plug.Conn.t()