Skip to main content

normalize_origin

Function normalize_origin 

Source
pub fn normalize_origin(origin: &str) -> Option<String>
Expand description

The canonical form of a web origin (scheme://host[:port], lowercase, without a trailing slash), or None if origin is not one: the scheme must be http or https, the host must be present, a port must be a number, and there must be no path, query or user info.