mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
Fix "Cannot set headers after they are sent" error in logout function
This commit is contained in:
parent
9a5793dfdd
commit
dab65a6364
@ -150,9 +150,9 @@ function logout(req: Request, res: Response) {
|
||||
|
||||
if (openID.isOpenIDEnabled() && openIDEncryption.isSubjectIdentifierSaved()) {
|
||||
res.oidc.logout({ returnTo: '/' });
|
||||
} else res.redirect('login');
|
||||
}
|
||||
|
||||
res.sendStatus(200);
|
||||
res.redirect('login');
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user