Skip to main content

normalize_origin

Function normalize_origin 

Source
pub fn normalize_origin(origin: &str) -> Result<String, DomainLinkageError>
Available on crate feature domain-linkage only.
Expand description

origin as scheme://host[:port], lowercased, with https assumed when no scheme is given and a path, query or fragment dropped.

ยงErrors

DomainLinkageError::InvalidOrigin when origin has no host, or one that is not an RFC 3986 host.