Skip to main content

CookieOptions

For AI agents: see llms.txt for the complete documentation index. Markdown versions are available by adding .md to a page URL or requesting Accept: text/markdown.

Attributes applied when writing a cookie. The low-level shape, all optional.

Properties​

PropertyTypeDescription
domain?stringCookie domain.
expires?DateAbsolute expiry.
httpOnly?booleanWhether to hide the cookie from client JS.
maxAge?numberMax age in seconds.
path?stringCookie path. Defaults to "/".
sameSite?"none" | "lax" | "strict"CSRF posture. Defaults to "lax".
secure?booleanWhether to send only over HTTPS.