Files

14 lines
318 B
JavaScript
Raw Permalink Normal View History

2026-05-13 19:27:59 -04:00
const { csrfSync } = require("csrf-sync");
const {
2026-05-13 19:30:35 -04:00
invalidCsrfTokenError,
generateToken,
validateRequest,
csrfSynchronisedProtection
} = csrfSync({ getTokenFromRequest: (req) => req.body._csrf, });
2026-05-13 19:27:59 -04:00
module.exports = {
2026-05-13 19:30:35 -04:00
generateToken,
csrfSynchronisedProtection,
invalidCsrfTokenError
2026-05-13 19:27:59 -04:00
};