Skip to main content
zerotal

Documentation


Documentation / @zerotal/core / index / CookieOptions

Interface: CookieOptions

Defined in: support/cookie.ts:13

Properties

name

name: string

Defined in: support/cookie.ts:15

Cookie name.


value

value: string

Defined in: support/cookie.ts:17

Cookie value (caller is responsible for encoding if needed).


path?

optional path?: string

Defined in: support/cookie.ts:19

Path attribute. Defaults to /.


maxAge?

optional maxAge?: number

Defined in: support/cookie.ts:21

Max-Age in seconds. Omit for a session cookie. 0 clears the cookie.


sameSite?

optional sameSite?: SameSite

Defined in: support/cookie.ts:23

SameSite attribute. Defaults to Lax.


httpOnly?

optional httpOnly?: boolean

Defined in: support/cookie.ts:25

Add the HttpOnly attribute. Defaults to true — pass false for cookies JS must read (e.g. XSRF-TOKEN).


secure?

optional secure?: boolean

Defined in: support/cookie.ts:27

Add the Secure attribute. Defaults to false.


domain?

optional domain?: string

Defined in: support/cookie.ts:29

Domain attribute. Omitted when absent.