【问题标题】:If no express-cookie timeout is set, is there a defaulted timeout as a preset?如果没有设置 express-cookie 超时,是否有默认超时作为预设?
【发布时间】:2016-10-28 09:23:36
【问题描述】:

使用快速会话,如果您不指定最大超时示例:

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

是否有预设的默认时间?

【问题讨论】:

    标签: node.js session-cookies express-session


    【解决方案1】:

    就在docs,伙计:

    “会话 ID cookie 的设置对象。默认值为 { path: '/', httpOnly: true, secure: false, maxAge: null }。”

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-08-23
      • 2012-05-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-28
      • 2019-07-29
      相关资源
      最近更新 更多