Frage

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?

War es hilfreich?

Lösung

You can install and require csurf for Express 4.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top