Documentation ¶
Overview ¶
Package cookie implements predicate to check parsed cookie headers by name and value.
Index ¶
Constants ¶
View Source
const Name = predicates.CookieName
Name the predicate can be referenced in eskip by the name "Cookie". Deprecated, use predicates.CookieName instead
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New() routing.PredicateSpec
New creates a predicate specification, whose instances can be used to match parsed request cookies.
The cookie predicate accepts two arguments, the cookie name, with what a cookie must exist in the request, and an expression that the cookie value needs to match.
Eskip example:
Cookie("tcial", /^enabled$/) -> "https://www.example.org";
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.