fix(api): csurf to SameSite 'strict', https only (#39077)
Lax and http are probably sufficient, but if the stricter versions work there's no harm using them.
This commit is contained in:
committed by
GitHub
parent
02bb0546a1
commit
b3d5cde75e
@ -3,7 +3,9 @@ import csurf from 'csurf';
|
|||||||
export default function() {
|
export default function() {
|
||||||
const protection = csurf({
|
const protection = csurf({
|
||||||
cookie: {
|
cookie: {
|
||||||
domain: process.env.COOKIE_DOMAIN || 'localhost'
|
domain: process.env.COOKIE_DOMAIN || 'localhost',
|
||||||
|
sameSite: 'strict',
|
||||||
|
secure: true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return function csrf(req, res, next) {
|
return function csrf(req, res, next) {
|
||||||
|
Reference in New Issue
Block a user