Replace csurf with csrf-sync
parent
2bd6eea2fa
commit
a5d92da9dd
@ -0,0 +1,15 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
const { csrfSync } = require('csrf-sync');
|
||||||
|
|
||||||
|
const {
|
||||||
|
generateToken,
|
||||||
|
csrfSynchronisedProtection,
|
||||||
|
} = csrfSync({
|
||||||
|
size: 64
|
||||||
|
});
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
generateToken,
|
||||||
|
csrfSynchronisedProtection,
|
||||||
|
};
|
Loading…
Reference in New Issue