質問

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?

役に立ちましたか?

解決

You can install and require csurf for Express 4.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top