diff options
author | Loïc Hoguin <[email protected]> | 2020-03-15 18:41:48 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2020-03-15 18:41:48 +0100 |
commit | e37af7ac0caffc661def1593c55b212cc2f05d3e (patch) | |
tree | 0e55296085281e8360261394259c9988b4bd83ac /doc/src/manual/gun_cookies.domain_match.asciidoc | |
parent | 87d0bfff926892d2dc0a55a3dc45d8c5f8a682f3 (diff) | |
download | gun-e37af7ac0caffc661def1593c55b212cc2f05d3e.tar.gz gun-e37af7ac0caffc661def1593c55b212cc2f05d3e.tar.bz2 gun-e37af7ac0caffc661def1593c55b212cc2f05d3e.zip |
Document the cookie store option and related modules
Also contains a few small changes and Dialyzer fixes.
Diffstat (limited to 'doc/src/manual/gun_cookies.domain_match.asciidoc')
-rw-r--r-- | doc/src/manual/gun_cookies.domain_match.asciidoc | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/doc/src/manual/gun_cookies.domain_match.asciidoc b/doc/src/manual/gun_cookies.domain_match.asciidoc new file mode 100644 index 0000000..34f52ec --- /dev/null +++ b/doc/src/manual/gun_cookies.domain_match.asciidoc @@ -0,0 +1,52 @@ += gun_cookies:domain_match(3) + +== Name + +gun_cookies:domain_match - Cookie domain match + +== Description + +[source,erlang] +---- +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 +[source,erlang] +---- +Match = gun_cookies:domain_match(Domain, CookieDomain). +---- + +== See also + +link:man:gun_cookies(3)[gun_cookies(3)], +link:man:gun_cookies:path_match(3)[gun_cookies:path_match(3)] |