V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
nocturnal
V2EX  ›  Node.js

新手求教 关于express session跳页面后丢失的问题

  •  
  •   nocturnal · 2014-01-10 17:09:55 +08:00 · 4051 次点击
    这是一个创建于 3756 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我在登录的时候用户信息存进session req.session.user=itemDetails[0];
    然后 console.log(req.session); 信息如下
    { cookie:
    { path: '/',
    _expires: Sun Feb 09 2014 17:00:47 GMT+0800 (CST),
    originalMaxAge: 2592000000,
    httpOnly: true },
    user:
    { ID: '123',
    LATMELE: null,
    NAME: null,
    ADDRESS: null,
    PS: '123',
    LOGINNAME: '123',
    PHONE: null,
    LATMWA: null } }
    然后在页面点击链接后在后台拿不到session的值,console.log(req.session); 信息如下
    { cookie:
    { path: '/',
    _expires: Sun Feb 09 2014 17:00:48 GMT+0800 (CST),
    originalMaxAge: 2592000000,
    httpOnly: true } }

    请问只是为什么
    2 条回复    1970-01-01 08:00:00 +08:00
    turing
        1
    turing  
       2014-01-10 20:16:43 +08:00
    session的配置呢?
    rekey
        2
    rekey  
       2014-01-12 07:38:28 +08:00
    开了cluster?
    cookie配置也很重要...
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3381 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 11:52 · PVG 19:52 · LAX 04:52 · JFK 07:52
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.