diff --git a/src/services/auth.ts b/src/services/auth.ts index 69bffa73b..7d55c3d32 100644 --- a/src/services/auth.ts +++ b/src/services/auth.ts @@ -28,7 +28,7 @@ function checkAuth(req: Request, res: Response, next: NextFunction) { } else if (currentTotpStatus !== lastAuthState.totpEnabled || currentSsoStatus !== lastAuthState.ssoEnabled) { req.session.destroy((err) => { if (err) console.error('Error destroying session:', err); - res.redirect('/login'); + res.redirect('login'); }); return; } else if (currentSsoStatus) { @@ -36,7 +36,7 @@ function checkAuth(req: Request, res: Response, next: NextFunction) { next(); return; } - res.redirect('/login'); + res.redirect('login'); return; } else if (!req.session.loggedIn && !noAuthentication) { const redirectToShare = options.getOptionBool("redirectBareDomain");