Skip to main content

is_loopback_host

Function is_loopback_host 

Source
pub fn is_loopback_host(host: &str) -> bool
Expand description

Whether host names the local loopback — the dev/test carve-out for plaintext http:// (production transports are TLS-only). Accepts the IPv4 loopback block (127.0.0.0/8), the IPv6 loopback (::1, bare or bracketed), and the literal name localhost. A resolvable-but-unresolved name is NOT loopback — this classifies the written form, without DNS.