Question

With the dawn of Express 4 connect is no longer a dependancy. I can't find on the express site any new implementation of csrf.

the old way was app.use(express.csrf()); and then add in a middleware function to expose it in the view.

My question is: Am I now forced to include connect as a dependency, or is there something baked into express now that allows for csrf that I am missing?

Or can I just include the source of csrf into my app?

Was it helpful?

Solution

You can install and require csurf for Express 4.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top