mirror of
https://github.com/zadam/trilium.git
synced 2025-11-10 13:50:42 +08:00
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
This commit is contained in:
parent
3b69eadbf6
commit
9ef6f3e947
1 changed files with 1 additions and 1 deletions
|
|
@ -15,7 +15,7 @@ const noAuthentication = config.General && config.General.noAuthentication === t
|
||||||
|
|
||||||
function checkAuth(req: Request, res: Response, next: NextFunction) {
|
function checkAuth(req: Request, res: Response, next: NextFunction) {
|
||||||
if (!sqlInit.isDbInitialized()) {
|
if (!sqlInit.isDbInitialized()) {
|
||||||
res.redirect('setup');
|
return res.redirect('setup');
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentTotpStatus = totp.isTotpEnabled();
|
const currentTotpStatus = totp.isTotpEnabled();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue