mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-02 22:00:34 +01:00
Logout without scripts
This commit is contained in:
@@ -404,7 +404,11 @@ authenticationController.logout = function (req, res, next) {
|
||||
function () {
|
||||
// Force session check for all connected socket.io clients with the same session id
|
||||
sockets.in('sess_' + req.sessionID).emit('checkSession', 0);
|
||||
res.status(200).send('');
|
||||
if (req.body.noscript === 'true') {
|
||||
res.redirect(nconf.get('relative_path') + '/');
|
||||
} else {
|
||||
res.status(200).send('');
|
||||
}
|
||||
},
|
||||
], next);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user