mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
fix: CSRF issue #51
This commit is contained in:
1 parent
2ac73a06c9
commit
d45fbee647
2 files changed
+2
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import csrf from 'csurf'
|
||||
|
||||
const CSRF = csrf({ cookie: true })
|
||||
function csrfProtection(req, res, next) {
|
||||
if (req.method === 'POST') {
|
||||
|
||||
Reference in new issue
Block a user