Search code examples
node.jssession-cookiesexpress-session

If no express-cookie timeout is set, is there a defaulted timeout as a preset?


With express session, if you do not specify a max timeout example:

cookie: { maxAge: new Date(Date.now() + (60 * 1000 * 30)) })

is there a default time that is preset?


Solution

  • It's right there in the docs, man:

    "Settings object for the session ID cookie. The default value is { path: '/', httpOnly: true, secure: false, maxAge: null }."