Skip to content

hostMatchesAllowlist

hostMatchesAllowlist(host, allowlist): boolean

Defined in: src/egress.ts:421

True when host matches an entry in allowlist exactly OR as a subdomain. E.g. allowlist entry "anthropic.com" matches "api.anthropic.com".

Used by the drop-watcher. dnsmasq’s --server=/domain/ already does suffix matching natively; this function exists for reuse in the drop-log parser.

string

string[]

boolean