pub fn is_loopback(url: &Url) -> boolExpand description
Whether url names this machine and nowhere else.
localhost by name, or any address the standard library calls a
loopback address, which covers 127.0.0.0/8 and ::1 without this
having to enumerate either.
The host is taken from Url::host rather than Url::host_str. The
string form of an IPv6 host keeps the brackets the URL syntax requires,
[::1] parses as no address at all, and a check written against it
refuses a client listening on IPv6 loopback.