mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-06 23:27:56 +02:00
fixed admin lockout timer for subfolder installs @barisusakli :trollface:
This commit is contained in:
@@ -209,12 +209,12 @@ middleware.isAdmin = function(req, res, next) {
|
||||
return next();
|
||||
}
|
||||
|
||||
req.session.returnTo = nconf.get('relative_path') + req.path.replace(/^\/api/, '');
|
||||
req.session.returnTo = req.path.replace(/^\/api/, '');
|
||||
req.session.forceLogin = 1;
|
||||
if (res.locals.isAPI) {
|
||||
res.status(401).json({});
|
||||
} else {
|
||||
res.redirect('/login');
|
||||
res.redirect(nconf.get('relative_path') + '/login');
|
||||
}
|
||||
});
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user