From ff4353794263e024e7753e37a5d649e1a035010e Mon Sep 17 00:00:00 2001 From: Jin <22962980+JYC333@users.noreply.github.com> Date: Mon, 31 Mar 2025 21:08:22 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20fix=20redirect=20url=20wi?= =?UTF-8?q?th=20reverse=20proxy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/auth.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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");