Skip to main content

host_of

Function host_of 

Source
pub fn host_of(iri: &str) -> Option<String>
Expand description

The host of the URL iri, without its port, in the form hosts are compared in: lower case, an internationalised name in its ASCII form, an IPv6 address in brackets. None when iri is not a URL or has no host. This is the host Mastodon’s Addressable::URI.parse(url).normalized_host reads, by which it tracks deliveries and matches domain blocks.