Home > next-context > CookieAttributes
cookie attributes
Signature:
export interface CookieAttributes
Property |
Modifiers |
Type |
Description |
---|---|---|---|
string | undefined |
(Optional) Define the domain where the cookie is available. Defaults to the domain of the page where the cookie was created. | ||
Date | undefined |
(Optional) Defines the exact date when the cookie will expire. | ||
number |
(Optional) Sets the cookie’s lifespan in seconds. | ||
string | undefined |
(Optional) Define the path where the cookie is available. Defaults to '/' | ||
'strict' | 'lax' | 'none' | undefined |
(Optional) Asserts that a cookie must not be sent with cross-origin requests, providing some protection against cross-site request forgery attacks (CSRF) | ||
boolean | undefined |
(Optional) A Boolean indicating if the cookie transmission requires a secure protocol (https). Defaults to false. |