Created
February 17, 2016 03:52
-
-
Save deepal/5f4b5bb1de024e8b11d9 to your computer and use it in GitHub Desktop.
nodesec-csrf-angular
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*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