pub fn origin_of(url: &str) -> StringExpand description
Extract the origin (scheme://host[:port]) from a URL string,
stripping any path/query/fragment. Best-effort string slicing —
no full URL parser dep. Public so router crates can reuse the same
logic when comparing redirect URLs against the trusted-origins list.