max-age in seconds
>= 0
max-age in seconds
>= 0
JSON echo with Cache-Control: public, max-age=n
Parses the Cookie header and returns a JSON object with a cookies key
containing a map of cookie name-value pairs.
{ "cookies": { "session": "abc123", "theme": "dark" } }
Returns all cookies from the request
GET /cookies/delete. Each query-parameter name expires the matching cookie
(Max-Age=0), and the response is a 302 redirect to /cookies.
DELETE /cookies?foo&theme expires both cookies and redirects.
Cookie names to delete
Redirects to /cookies after deleting cookies
Each query parameter name is used to expire the corresponding cookie.
The value of the query parameter is ignored.
GET /cookies/delete?foo&theme expires both cookies and redirects.
Cookie names to delete
Redirects to /cookies after deleting cookies
Each non-reserved query parameter becomes a Set-Cookie response header.
Reserved keys add attributes applied to every cookie set in the request:
secure, httponly, samesite=<Strict|Lax|None>, max_age=<seconds>,
path=<path> (default /), domain=<domain>. After setting the cookies,
responds with a 302 redirect to /cookies so the client can see the result.
GET /cookies/set?session=abc&secure&httponly&samesite=Strict&max_age=3600
sets session=abc; Path=/; Max-Age=3600; SameSite=Strict; Secure; HttpOnly.
Cookie name=value pairs, plus optional attribute flags: secure, httponly, samesite, max_age, path, domain
Redirects to /cookies after setting cookies