From e37af7ac0caffc661def1593c55b212cc2f05d3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Sun, 15 Mar 2020 18:41:48 +0100 Subject: Document the cookie store option and related modules Also contains a few small changes and Dialyzer fixes. --- doc/src/manual/gun_cookies.path_match.asciidoc | 52 ++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 doc/src/manual/gun_cookies.path_match.asciidoc (limited to 'doc/src/manual/gun_cookies.path_match.asciidoc') diff --git a/doc/src/manual/gun_cookies.path_match.asciidoc b/doc/src/manual/gun_cookies.path_match.asciidoc new file mode 100644 index 0000000..2e1771a --- /dev/null +++ b/doc/src/manual/gun_cookies.path_match.asciidoc @@ -0,0 +1,52 @@ += gun_cookies:path_match(3) + +== Name + +gun_cookies:path_match - Cookie path match + +== Description + +[source,erlang] +---- +path_match(ReqPath, CookiePath) -> boolean() + +ReqPath :: binary() +CookiePath :: binary() +---- + +Cookie path match. + +This function can be used when implementing the +`set_cookie_secure_match` callback of a cookie store. + +== Arguments + +ReqPath:: + +The request path to match. + +CookiePath:: + +The cookie path that will be matched against. + +== Return value + +Returns `true` when `ReqPath` path-matches `CookiePath`, +and `false` otherwise. + +== Changelog + +* *2.0*: Function introduced. + +== Examples + +.Perform a path match +[source,erlang] +---- +Match = gun_cookies:path_match(ReqPath, CookiePath). +---- + +== See also + +link:man:gun_cookies(3)[gun_cookies(3)], +link:man:gun_cookies:domain_match(3)[gun_cookies:domain_match(3)] -- cgit v1.2.3