Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
nodesec-csrf-express
var csrf = require('csurf');
/*some code here*/
var app = express();
/*some code here*/
app.use(csrf());
app.get('/', function(req, res, next){
res.render('index', {
_csrfToken = req.csrfToken();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.