]> git.cworth.org Git - zombocom-ai/blobdiff - index.js
Extend maxAge of cookies to be a full week
[zombocom-ai] / index.js
index 7083b13dc1eb790b1c26400ca67de44596a09fd7..b149d09b58733ac1ab0b9da9fae802b2ff304446 100644 (file)
--- a/index.js
+++ b/index.js
@@ -75,7 +75,14 @@ const session_middleware =  session(
      secret: process.env.ZOMBOCOM_SESSION_SECRET,
      resave: false,
      saveUninitialized: true,
-     rolling: true
+     rolling: true,
+     // Let each cookie live for a full month
+     cookie: {
+         path: '/',
+         httpOnly: true,
+         secure: false,
+         maxAge: 1000 * 60 * 60 * 24 * 30
+     }
     });
 
 app.use(session_middleware);