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

2014-01-10 17:09:55 +08:00
 nocturnal
我在登录的时候用户信息存进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 } }

请问只是为什么
4063 次点击
所在节点    Node.js
2 条回复
turing
2014-01-10 20:16:43 +08:00
session的配置呢?
rekey
2014-01-12 07:38:28 +08:00
开了cluster?
cookie配置也很重要...

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/96469

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX