John Anderson John Anderson - 1 month ago 8
Node.js Question

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?

Answer

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 }."

Comments