Skip to content

Commit

Permalink
fix: add back req.query fallback for backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlam committed Feb 22, 2023
1 parent ea95668 commit 83d3633
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/middleware/csrf.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ const {
return req.headers['x-csrf-token'];
} else if (req.body.csrf_token) {
return req.body.csrf_token;
} else if (req.query) {
return req.query._csrf;
}
},
size: 64,
Expand Down

0 comments on commit 83d3633

Please sign in to comment.