ContentSecurityPolicy v1.0.3 ContentSecurityPolicy.Directive View Source
Contains functions useful for interacting with Content Security Policy directives.
Directives are the keys in a content secrurity which define the scope of what the source values apply to.
As an example, in the policy of "default-src 'self'"
, default-src
is the
directive.
Link to this section Summary
Functions
Validates a given directive. Used by other functions in
ContentSecurityPolicy
.
Link to this section Types
Link to this section Functions
Link to this function
validate_directive!(directive)
View Sourcevalidate_directive!(valid_directive()) :: :ok
Validates a given directive. Used by other functions in
ContentSecurityPolicy
.
Raises an ArgumentError
if the directive is not valid.