Type Definition kvarn::csp::Csp

source ·
pub type Csp = RuleSet<CspRule>;
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(),
);

Trait Implementations§

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