Skip to main content

hostname_matches_domain

Function hostname_matches_domain 

Source
pub fn hostname_matches_domain(hostname: &str, domain: &str) -> bool
Expand description

Reports whether a hostname is equal to or beneath a domain name.

Matching is ASCII case-insensitive and accepts a domain with an optional leading dot. A suffix only matches at a DNS label boundary. A single dot matches only a hostname with a trailing dot.