fix: update csrf parser to accept csrf_token form value if present

This commit is contained in:
psibean
2023-02-17 15:19:41 -05:00
committed by Julian Lam
parent cc147ab31d
commit ea95668a76
2 changed files with 3 additions and 3 deletions

View File

@@ -9,8 +9,8 @@ const {
getTokenFromRequest: (req) => {
if (req.headers['x-csrf-token']) {
return req.headers['x-csrf-token'];
} else if (req.query) {
return req.query._csrf;
} else if (req.body.csrf_token) {
return req.body.csrf_token;
}
},
size: 64,