@Override
    public boolean accept(URI uri, Cookie cookie) {
        requireNonNull(uri, "uri");
        requireNonNull(cookie, "cookie");
        final String domain = cookie.domain();
        final String host = uri.getHost();
        if (domain == null || host == null) {
            return false;
        }
        if (PublicSuffix.get().isPublicSuffix(domain)) {
            return false;
        }
        if (domain.equalsIgnoreCase(host)) {
            return true;
        }
        return host.endsWith(domain) && host.charAt(host.length() - domain.length() - 1) == '.' &&
               !NetUtil.isValidIpV4Address(host) && !NetUtil.isValidIpV6Address(host);
    }
Accepts a cookie if its domain is non-null, not a public suffix, and matches the server host as
specified by RFC 6265 <a href="https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.3">Domain Matching</a>.
core/src/main/java/com/linecorp/armeria/client/cookie/AcceptOriginCookiePolicy.java