vite_deleteelectron
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
// middleware/csrf.js
|
||||
const csurf = require('csurf');
|
||||
|
||||
const csrfProtection = csurf({ cookie: false });
|
||||
|
||||
const csrfMiddleware = (req, res, next) => {
|
||||
if (
|
||||
req.path === '/login' ||
|
||||
req.path === '/moders/moder-login' ||
|
||||
req.path === '/moders/csrf-token'
|
||||
) {
|
||||
return next();
|
||||
}
|
||||
return csrfProtection(req, res, next);
|
||||
};
|
||||
|
||||
module.exports = csrfMiddleware;
|
||||
Reference in New Issue
Block a user