Skip to main content

domains_name_host

Function domains_name_host 

Source
pub fn domains_name_host(domains: &[String], host: &str) -> bool
Expand description

Whether ip is this machine or a network behind it rather than the public internet: unspecified, loopback, private, link-local, carrier-grade NAT, unique-local, site-local, multicast and the reserved blocks, and an IPv6 address that carries one of those IPv4 ones (mapped, compatible, NAT64, 6to4).

Whether domains — web.allowed_domains, as written in settings — names host, itself or as a subdomain. Case, a trailing dot and the brackets around an IPv6 address do not matter.