Logout without scripts

This commit is contained in:
André Zanghelini
2017-06-03 16:42:15 -03:00
parent a49a9a07b3
commit 097bb51577

View File

@@ -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);
};