mirror of
https://github.com/MCSManager/MCSManager.git
synced 2024-11-21 03:12:10 +08:00
修改 - 优化代码
This commit is contained in:
parent
54a2e1f2df
commit
ff0b66e93e
2
app.js
2
app.js
@ -134,7 +134,7 @@ app.use(session({
|
||||
maxAge: 1000 * 60 * 60 * 4
|
||||
},
|
||||
resave: false,
|
||||
saveUninitialized: true
|
||||
saveUninitialized: false
|
||||
}));
|
||||
|
||||
//使用 gzip 静态文本压缩,但是如果你使用反向代理或某 HTTP 服务自带的gzip,请关闭它
|
||||
|
@ -18,6 +18,7 @@ const userManager = userCenter();
|
||||
router.post('/loginout', function (req, res) {
|
||||
|
||||
MCSERVER.log('[loginout] 用户:' + req.session['username'] + '退出');
|
||||
loginedContainer.delLogined(req.session['username']);
|
||||
// BUG Note: Ws—close 与 Loginout 时 Session 可能不一定及时同步
|
||||
// 导致我们暂时无法用一种很简单的方式来实现动态的更换 token
|
||||
req.session['login'] = false;
|
||||
|
Loading…
Reference in New Issue
Block a user