csrf.js 233 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 'use strict'; const csrf = require('csurf'); const csrfInit = csrf(); const csrfToken = (req, res, next) => { res.locals.csrfToken = req.csrfToken(); next(); }; module.exports = () => { return [csrfInit, csrfToken]; };