chore: add comment for clarification

This commit is contained in:
Julian Lam
2020-12-07 15:44:34 -05:00
parent 13d5a1440b
commit 6037f5ee2c

View File

@@ -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);
}