From ba847292b621ef110227d7e78764cef0e3ef580c Mon Sep 17 00:00:00 2001 From: Antoine Moreaux Date: Mon, 18 Nov 2024 14:29:19 +0100 Subject: [PATCH] refactor: add default fallback for session store secret (#8553) **Description:** - Add default fallback for session store secret. - Updated SESSION_STORE_SECRET validation to be optional and of type string. --- .../engine/core-modules/environment/environment-variables.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/twenty-server/src/engine/core-modules/environment/environment-variables.ts b/packages/twenty-server/src/engine/core-modules/environment/environment-variables.ts index a50ef42804..888540b5fc 100644 --- a/packages/twenty-server/src/engine/core-modules/environment/environment-variables.ts +++ b/packages/twenty-server/src/engine/core-modules/environment/environment-variables.ts @@ -447,8 +447,9 @@ export class EnvironmentVariables { @CastToPositiveNumber() CACHE_STORAGE_TTL: number = 3600 * 24 * 7; - @ValidateIf((env) => env.ENTERPRISE_KEY) - SESSION_STORE_SECRET: string; + @IsString() + @IsOptional() + SESSION_STORE_SECRET = 'replace_me_with_a_random_string_session'; @CastToBoolean() CALENDAR_PROVIDER_GOOGLE_ENABLED = false;