alakajam-team / alakajam

Website powering the Alakajam! game making community
https://alakajam.com/
Other
28 stars 13 forks source link

Use csurf as a global middleware #596

Closed mkalam-alami closed 3 years ago

mkalam-alami commented 3 years ago

It's already configured to ignore GET methods so it would probably have the same effect but simplify things.

mkalam-alami commented 3 years ago

Cannot be done easily, because CSRF protection relies on body parsing, which uses either the standard body-parser or the multer lib depending on the route. The CSRF middleware has to always be plugged after them.