isLoopbackHost
True only when host is the name localhost or an IP literal that is a loopback address.
A host such as 127.evil.com is a DNS name, not a literal, and is never loopback here; no DNS lookup is ever performed. IPv6 literals may be bracketed ([::1]) and IPv4-mapped IPv6 loopback (::ffff:127.0.0.1) is recognised.