Open hrj904064990 opened 5 years ago
adapter.js的配置
exports.session = {
type: 'file',
common: {
timeout: 24 * 60 * 60 * 1000,// millisecond
cookie: {
name: 'thinkjs',
keys: ['signature key'],
signed: true
}
},
file: {
handle: fileSession,
sessionPath: path.join(think.ROOT_PATH, 'runtime/session')
}
}
你线上几台机器?
只有一台
没有东西返回
undefined
那你看看 file 有内容不, debug一下 think-session/ think-session-file.
让你整蒙了,我想成 cache 了。。。 你为啥不 await this.session('name'),你为啥取 cookie 去。。。
我做的登录功能需要cookie和session同时作用
DESC
ENV
OS Platform:
Node.js Version:
ThinkJS Version:
code
error message
more description
// your detail description 在线下环境下,可以通过this.cookie('thinkjs')获取到session对应的cookie,但是线上环境下却无法获取到session对应的cookie。