localHostOrDomainIs()
True if host equals hostdom exactly, or host is the unqualified first label of hostdom.
localHostOrDomainIs(host, hostdom) → booleanlocalHostOrDomainIs("www", "www.corp.example") and localHostOrDomainIs("www.corp.example", "www.corp.example")
are true; localHostOrDomainIs("www.other.example", "www.corp.example") is false. Rarely needed in modern PACs.
Example
if (localHostOrDomainIs(host, "intranet.corp.example")) {
return "DIRECT";
}