]> git.cworth.org Git - zombocom-ai/commitdiff
Set session to be "rolling"
authorCarl Worth <cworth@cworth.org>
Wed, 21 Dec 2022 19:51:50 +0000 (11:51 -0800)
committerCarl Worth <cworth@cworth.org>
Wed, 21 Dec 2022 19:59:18 +0000 (11:59 -0800)
That is, the expiration of the session should be extended on every
request, (making the session last much longer as long as the user is
interacting with it).

This should help with any workaround I put in place for username
tweaking on the backend, (since Hyrum's iPhone is having trouble
setting his name).

index.js

index babe27068b4d83094c451b633da72367ce4d296d..7083b13dc1eb790b1c26400ca67de44596a09fd7 100644 (file)
--- a/index.js
+++ b/index.js
@@ -74,7 +74,8 @@ const session_middleware =  session(
     {store: new FileStore,
      secret: process.env.ZOMBOCOM_SESSION_SECRET,
      resave: false,
-     saveUninitialized: true
+     saveUninitialized: true,
+     rolling: true
     });
 
 app.use(session_middleware);