Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 9ef6f3e

Browse files
committed
fix(services/auth): fix ERR_HTTP_HEADERS_SENT errors on new unitialized Setups
was previously showing two errors: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
1 parent 3b69ead commit 9ef6f3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const noAuthentication = config.General && config.General.noAuthentication === t
1515

1616
function checkAuth(req: Request, res: Response, next: NextFunction) {
1717
if (!sqlInit.isDbInitialized()) {
18-
res.redirect('setup');
18+
return res.redirect('setup');
1919
}
2020

2121
const currentTotpStatus = totp.isTotpEnabled();

0 commit comments

Comments
 (0)