CookieOptions
Class: CookieOptions
Defined in: packages/core/src/session/cookie.ts:18
Cookie Options
Implements
Omit<CookieSerializeOptions,"domain">
Constructors
Constructor
new CookieOptions(
options,httpContext?):CookieOptions
Defined in: packages/core/src/session/cookie.ts:74
Load with default value
Parameters
options
Partial<CookieOptions>
the options
httpContext?
the HTTP context
Returns
CookieOptions
Properties
_maxAge?
optional_maxAge?:Duration
Defined in: packages/core/src/session/cookie.ts:35
Duration storage
domain?
optionaldomain?:string|true
Defined in: packages/core/src/session/cookie.ts:30
if true domain will be set to the request hostname if undefined no domain will be output (browser will use the current domain and only this one) if a string is provided it will be used as the domain
When provided a domain is setting the cookie to be available to all subdomains
httpOnly?
optionalhttpOnly?:boolean
Defined in: packages/core/src/session/cookie.ts:57
Default
true
Implementation of
Omit.httpOnly
name?
optionalname?:string
Defined in: packages/core/src/session/cookie.ts:67
Name of the cookie
path?
optionalpath?:string
Defined in: packages/core/src/session/cookie.ts:53
Default
/
Implementation of
Omit.path
sameSite?
optionalsameSite?:"none"|"strict"|"lax"
Defined in: packages/core/src/session/cookie.ts:22
Default
lax
Implementation of
Omit.sameSite
secure?
optionalsecure?:boolean
Defined in: packages/core/src/session/cookie.ts:63
If not set will be true if https request and false otherwise If defined it will be set to the value
Default
undefined
Implementation of
Omit.secure
Accessors
maxAge
Get Signature
get maxAge():
number
Defined in: packages/core/src/session/cookie.ts:47
Get the max age in seconds, defaulting to 7 days
Returns
number
the result number
Set Signature
set maxAge(
value):void
Defined in: packages/core/src/session/cookie.ts:40
Minimum
1
Default
7d
Parameters
value
string | number
Returns
void
Implementation of
Omit.maxAge