avrodh-session
Advanced tools
Comparing version 2.0.0 to 3.0.0
@@ -37,4 +37,12 @@ "use strict"; | ||
secure: process.env.NODE_ENV === "production", | ||
sameSite: "strict", | ||
})); | ||
app.use(csurf.generate()); | ||
app.use((req, res, next) => { | ||
if (["GET", "POST"].includes(req.method)) { | ||
csurf.generate()(req, res, next); | ||
} | ||
else { | ||
next(); | ||
} | ||
}); | ||
return { | ||
@@ -41,0 +49,0 @@ csurf, |
{ | ||
"name": "avrodh-session", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
6949
130