kvarn::csp

Type Alias Csp

source
pub type Csp = RuleSet<ComputedRule>;
Expand description

A Content Security Policy ruleset.

See CspRule for directives and CspValue for the values you can set.

§Examples

let mut extensions = Extensions::new();
extensions.with_csp(
    Csp::default()
        .add(
            "*",
            CspRule::default().img_src(CspValueSet::default().uri("https://kvarn.org")),
        )
        .arc(),
);

Aliased Type§

struct Csp { /* private fields */ }

Trait Implementations§

source§

impl Default for Csp

source§

fn default() -> Self

Returns the “default value” for a type. Read more