Skip to main content

is_loopback_addr

Function is_loopback_addr 

Source
pub fn is_loopback_addr(addr: &SocketAddr) -> bool
Expand description

Returns true if the socket address is bound to a loopback interface (IPv4 127.0.0.0/8 or IPv6 ::1). Used to determine whether automatic localhost-only origin validation should be applied when allowed_origins is empty.