fix(donate): allow calls to the API without auth
This is also dependent on 170e3dbf4f
This commit is contained in:
committed by
mrugesh
parent
b561599614
commit
ef39ab0e20
@ -8,7 +8,12 @@ export default function() {
|
||||
});
|
||||
return function csrf(req, res, next) {
|
||||
const { path } = req;
|
||||
if (/^\/hooks\/update-paypal$|^\/hooks\/update-stripe$/.test(path)) {
|
||||
if (
|
||||
// eslint-disable-next-line max-len
|
||||
/^\/hooks\/update-paypal$|^\/hooks\/update-stripe$|^\/donate\/charge-stripe$/.test(
|
||||
path
|
||||
)
|
||||
) {
|
||||
return next();
|
||||
}
|
||||
return protection(req, res, next);
|
||||
|
Reference in New Issue
Block a user