Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

handle-csrf-errors.js 197 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
  1. module.exports = function handleCSRFError (error, req, res, next) {
  2. // If the CSRF token is bad
  3. if (error.code === 'EBADCSRFTOKEN') {
  4. return res.sendStatus(403)
  5. }
  6. return next(error)
  7. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...