mirror of
https://github.com/wassname/talk.git
synced 2026-07-02 08:47:53 +08:00
Fixed session bug
This commit is contained in:
@@ -43,6 +43,7 @@ const session_opts = {
|
||||
rolling: true,
|
||||
saveUninitialized: false,
|
||||
resave: false,
|
||||
unset: 'destroy',
|
||||
name: 'talk.sid',
|
||||
cookie: {
|
||||
secure: false,
|
||||
|
||||
@@ -24,9 +24,9 @@ router.get('/', (req, res, next) => {
|
||||
* This destroys the session of a user, if they have one.
|
||||
*/
|
||||
router.delete('/', authorization.needed(), (req, res) => {
|
||||
req.session.destroy(() => {
|
||||
res.status(204).end();
|
||||
});
|
||||
delete req.session.passport;
|
||||
|
||||
res.status(204).end();
|
||||
});
|
||||
|
||||
//==============================================================================
|
||||
|
||||
Reference in New Issue
Block a user