Skip to main content

normalize_host

Function normalize_host 

Source
pub fn normalize_host(host: &str) -> String
Expand description

Normalize a Host header value for comparing against configured domain names: drop the port (api.example.com:4566), any trailing root dot, and lowercase it (DNS names are case-insensitive). A bracketed IPv6 literal keeps its brackets.