From c944e64178639c916ef40e2a3d7d1053d0fb2524 Mon Sep 17 00:00:00 2001 From: Gauthier Date: Wed, 2 Oct 2024 21:03:30 +0200 Subject: [PATCH] fix: set the correct TTL for the cookie store The time-to-live (TTL) of cookies stored in the database was incorrect because the connect-typeorm library takes a TTL in seconds and not milliseconds, making cookies valid for ~82 years instead of 30 days. --- server/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/index.ts b/server/index.ts index 10ca103299..97f05ab1c9 100644 --- a/server/index.ts +++ b/server/index.ts @@ -157,7 +157,7 @@ app }, store: new TypeormStore({ cleanupLimit: 2, - ttl: 1000 * 60 * 60 * 24 * 30, + ttl: 60 * 60 * 24 * 30, }).connect(sessionRespository) as Store, }) );