gun_cookies:path_match(3)

Name

gun_cookies:path_match - Cookie path match

Description

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
Match = gun_cookies:path_match(ReqPath, CookiePath).

See also

gun_cookies(3), gun_cookies:domain_match(3)

Gun 2.5 Function Reference

Navigation

Version select

Sponsor me!

Support my work on Cowboy, Ranch, Gun and Erlang.mk via GitHub Sponsors. The funds cover domain names and development tools.