Skip to main content

host_within

Function host_within 

Source
pub fn host_within(host: &str, parent: &str) -> bool
Expand description

Whether host is parent or one of its subdomains, without regard to case: a.example.com and example.com are within example.com, and notexample.com is not. This is how a block on a domain covers its subdomains, as Mastodon’s DomainBlock.rule_for matches every suffix of a host. An empty parent has nothing within it.