From 96e1d40304749ce00d2ff7359efc39a1d9724358 Mon Sep 17 00:00:00 2001 From: Gauthier Date: Wed, 2 Oct 2024 20:59:35 +0200 Subject: [PATCH] fix(session): set the correct TTL for the cookie store (#992) 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. fix #991 --- server/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/index.ts b/server/index.ts index 4ccc6fed1..965903618 100644 --- a/server/index.ts +++ b/server/index.ts @@ -175,7 +175,7 @@ app }, store: new TypeormStore({ cleanupLimit: 2, - ttl: 1000 * 60 * 60 * 24 * 30, + ttl: 60 * 60 * 24 * 30, }).connect(sessionRespository) as Store, }) );