Closed suhas-babyoye closed 7 years ago
The example provided is really bad. I'm not sure why they didn't implement it like so:
app.use(require('koa-csrf'))
or
var csrf = require('koa-csrf'); app.use(new csrf({}));
This is what almost all other koa middlewares do. At least update the example to work. =/
To be able to import
CSRF
in node 6.x we have to write like this:Is this the right way? Also, the README.md example doesn't import CSRF at all(although it is using es6 modules).