Node.js based forum software built for the modern web
refactor: change to exact match
Barış Soner Uşaklı32bfc96da14a
diff --git a/src/middleware/user.js b/src/middleware/user.jsindex f51689eeb6..99de735c29 100644--- a/src/middleware/user.js+++ b/src/middleware/user.js@@ -199,7 +199,7 @@ module.exports = function (middleware) {});middleware.redirectToAccountIfLoggedIn = helpers.try(async (req, res, next) => {- const isLoginPage = req.path.startsWith('/login') || req.path.startsWith('/api/login');+ const isLoginPage = req.path === '/login' || req.path === '/api/login';if ((isLoginPage && req.session.forceLogin) || req.uid <= 0) {return next();}