Skip to content

Instantly share code, notes, and snippets.

@itayw
Last active December 29, 2015 12:39
Show Gist options
  • Save itayw/7671593 to your computer and use it in GitHub Desktop.
Save itayw/7671593 to your computer and use it in GitHub Desktop.
nodejs express csrf
Dynamic helpers has been removed from Express since 3.x.
The new usage would be app.use(express.csrf());, which comes from Connect.
Connect details about csrf:
http://www.senchalabs.org/connect/csrf.html
Full example:
http://sporcic.org/2012/06/csrf-with-nodejs-and-express/
How to test:
http://stackoverflow.com/questions/18773846/how-to-test-endpoints-protected-by-csrf-in-node-js-express
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment