Name

gun_cookies:domain_match - Cookie domain match

Description

domain_match(String, DomainString) -> boolean()

String       :: binary()
DomainString :: binary()

Cookie domain match.

This function can be used when implementing the set_cookie_secure_match callback of a cookie store.

Arguments

String

The string to match.

DomainString

The domain string that will be matched against.

Return value

Returns true when String domain-matches DomainString, and false otherwise.

Changelog

  • 2.0: Function introduced.

Examples

Perform a domain match
Match = gun_cookies:domain_match(Domain, CookieDomain).

See also