-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
csrf.unless = unless;
const csrf = require('csurf');
then add it to middleware...
....
csrf({
cookie: true
}).unless({
path: [router.get('auth')]
}),
...
results in ....
unless is not a function
another example...
handleExpiredTokens.unless({
path: [{
url: '/foo',
methods: ['POST']
}]
});
function handleExpiredTokens(err, req, res, next) {
// stuff
}
handleExpiredTokens.unless = unless;
module.exports = handleExpiredTokens;
handleExpiredTokens runs on every request including POST /foo
Metadata
Metadata
Assignees
Labels
No labels