You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If opts is omitted, this.tokens = csrf(opts) is created without the default values .. all the default values went into this.opts .. So either that is a bug or the code could probably be clearer commenting why this is the case and perhaps moving this.tokens = csrf(opts); closer to the top.
I think the fix is to change: this.tokens = csrf(opts);
to this.tokens = csrf(this.opts);
If opts is omitted,
this.tokens = csrf(opts)
is created without the default values .. all the default values went into this.opts .. So either that is a bug or the code could probably be clearer commenting why this is the case and perhaps movingthis.tokens = csrf(opts);
closer to the top.I think the fix is to change:
this.tokens = csrf(opts);
to
this.tokens = csrf(this.opts);
https://github.com/koajs/csrf/blob/master/src/index.js#L13
The text was updated successfully, but these errors were encountered: