Skip to main content

IQCookieOptions

@quik/http


@quik/http / IQCookieOptions

Interface: IQCookieOptions

Defined in: http/src/router/endpoint/types.ts:99

Cookie options accepted by HTTP context implementations.

Properties​

domain?​

optional domain?: string

Defined in: http/src/router/endpoint/types.ts:128

Set the cookie domain name.


encode?​

optional encode?: (val) => string

Defined in: http/src/router/endpoint/types.ts:140

Encode the cookie value before writing it.

Parameters​

val​

string

Cookie value to encode

Returns​

string


expires?​

optional expires?: Date

Defined in: http/src/router/endpoint/types.ts:113

Set the expiry date of the cookie in GMT. If omitted, the adapter creates a session cookie.


httpOnly?​

optional httpOnly?: boolean

Defined in: http/src/router/endpoint/types.ts:118

Mark the cookie as accessible only by the web server.


maxAge?​

optional maxAge?: number

Defined in: http/src/router/endpoint/types.ts:103

Set the expiry time relative to the current time in milliseconds.


partitioned?​

optional partitioned?: boolean

Defined in: http/src/router/endpoint/types.ts:159

Mark the cookie to use partitioned storage.


path?​

optional path?: string

Defined in: http/src/router/endpoint/types.ts:123

Set the cookie path.


priority?​

optional priority?: "low" | "medium" | "high"

Defined in: http/src/router/endpoint/types.ts:154

Value of the “Priority” Set-Cookie attribute.

https://datatracker.ietf.org/doc/html/draft-west-cookie-priority-00#section-4.3


sameSite?​

optional sameSite?: boolean | "lax" | "strict" | "none"

Defined in: http/src/router/endpoint/types.ts:147

Value of the “SameSite” Set-Cookie attribute.

https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00#section-4.1.1.


secure?​

optional secure?: boolean

Defined in: http/src/router/endpoint/types.ts:133

Mark the cookie as HTTPS only.


signed?​

optional signed?: boolean

Defined in: http/src/router/endpoint/types.ts:108

Indicate if the cookie should be signed.