X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=index.js;h=b149d09b58733ac1ab0b9da9fae802b2ff304446;hb=e0a2bc11a60d831cda27ca04e20719f48588871f;hp=7083b13dc1eb790b1c26400ca67de44596a09fd7;hpb=205b1db399554a889b4767241231cefe07e1c773;p=zombocom-ai diff --git a/index.js b/index.js index 7083b13..b149d09 100644 --- 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);