kvarn::extensions

Struct RuleSet

source
pub struct RuleSet<R> { /* private fields */ }
Expand description

A set of rules applicable to certain paths. See the note at Self::empty on how paths are matched.

Implementations§

source§

impl RuleSet<AllowList>

source

pub fn check_origin( &self, origin: &Uri, uri_path: &str, ) -> Option<(MethodAllowList<'_>, &[HeaderName], Duration)>

Check if the (cross-origin) request’s origin Uri is allowed by the CORS rules.

See