Skip to content

Instantly share code, notes, and snippets.

@deepal
Created February 17, 2016 03:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save deepal/5f4b5bb1de024e8b11d9 to your computer and use it in GitHub Desktop.
Save deepal/5f4b5bb1de024e8b11d9 to your computer and use it in GitHub Desktop.
nodesec-csrf-angular
/*some code here*/
app.use(csrf());
app.use(function (req, res, next) {
res.cookie('XSRF-TOKEN', req.csrfToken());
next();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment