Skip to main content

is_localhost_host

Function is_localhost_host 

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

Returns true if host (from the HTTP Host header) resolves to a localhost address.

Handles localhost, 127.0.0.1, ::1, and any of those with a port suffix (e.g. localhost:7373, [::1]:7373).