mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	Merge pull request #1595 from TriliumNext/fix/logout-headers-sent-error
Fix "Cannot set headers after they are sent" error in logout function
This commit is contained in:
		
						commit
						4b64c34cbb
					
				| @ -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
	 JYC333
						JYC333