mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 02:55:58 +01:00 
			
		
		
		
	chore: add comment for clarification
This commit is contained in:
		| @@ -34,6 +34,7 @@ module.exports = function (middleware) { | |||||||
| 		const loginAsync = util.promisify(req.login).bind(req); | 		const loginAsync = util.promisify(req.login).bind(req); | ||||||
|  |  | ||||||
| 		if (req.loggedIn) { | 		if (req.loggedIn) { | ||||||
|  | 			// If authenticated via cookie (express-session), protect routes with CSRF checking | ||||||
| 			if (res.locals.isAPI) { | 			if (res.locals.isAPI) { | ||||||
| 				await middleware.applyCSRFasync(req, res); | 				await middleware.applyCSRFasync(req, res); | ||||||
| 			} | 			} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user