mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +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);
|
||||
|
||||
if (req.loggedIn) {
|
||||
// If authenticated via cookie (express-session), protect routes with CSRF checking
|
||||
if (res.locals.isAPI) {
|
||||
await middleware.applyCSRFasync(req, res);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user