我有一个在Cedar堆栈上运行的node.js应用程序,我很困惑为什么安全的cookie不起作用.
"express": "3.0.3",
"node": ">=0.8.14",
...
app.use(express.session({
secret : 'somesecret',
store : // store works fine, sessions are stored
key : 'sid',
cookie : {
secure : true, // it works without the secure flag (cookie is set)
proxy : true, // tried using this as well, no difference
maxAge: 5184000000 // 2 months
}
}));
...
Run Code Online (Sandbox Code Playgroud)
在localhost上一切正常,但在heroku上我似乎无法设置安全cookie.我究竟做错了什么?该文档称,负载平衡器终止SSL,它说的是配置在那里?
非常感谢