def cookie.domain_ok

emerging-ezhttp@0.21.0.0 · src/cookie.bend:444

import emerging-ezhttp@0.21.0.0/src/cookie.bend as Cookie
import 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))

Uses (5)

Used by (1)