From 931a168e5da35e1ecbd3743e38ee98a15b3ad13c Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sun, 27 Feb 2022 20:44:20 +0100 Subject: [PATCH] fix(session-middleware): don't hardcode database ttl The cookie expiration is taken from the config, but the expiration of session data in the database was hardcoded. This removes the hardcoded value, so TypeormStore defaults to cookie.maxAge. References: https://github.com/nykula/connect-typeorm#options https://github.com/expressjs/session#cookiemaxage Signed-off-by: David Mehren --- src/utils/session.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/utils/session.ts b/src/utils/session.ts index d8b10fd2c..048c7229a 100644 --- a/src/utils/session.ts +++ b/src/utils/session.ts @@ -32,7 +32,6 @@ export function setupSessionMiddleware( saveUninitialized: false, store: new TypeormStore({ cleanupLimit: 2, - ttl: 86400, }).connect(app.get>(getRepositoryToken(Session))), }), );