def cookie.domain_ok
import emerging-ezhttp@0.21.0.0/src/cookie.bend as Cookieimport Base
444# host-only is exact; a Domain attribute uses domain-match
445def cookie.domain_ok(host: String, domain: String, host_only: Bool) -> Bool:
446 match host_only:
447 case True{}:
448 String.eq(String.to_lower(host), String.to_lower(domain))
449 case False{}:
450 cookie.domain_match(String.to_lower(host), String.to_lower(domain))