nocturnal
V2EX  ›  Node.js

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

  •  
  •   nocturnal · Jan 10, 2014 · 4989 views
    This topic created in 4506 days ago, the information mentioned may be changed or developed.
    我在登录的时候用户信息存进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 replies    1970-01-01 08:00:00 +08:00
    turing
        1
    turing  
       Jan 10, 2014
    session的配置呢?
    rekey
        2
    rekey  
       Jan 12, 2014
    开了cluster?
    cookie配置也很重要...
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   935 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 19:29 · PVG 03:29 · LAX 12:29 · JFK 15:29
    ♥ Do have faith in what you're doing.