From dd146750b9db20bd738be9472a9a7e2d58551b46 Mon Sep 17 00:00:00 2001 From: Antoine Moreaux Date: Tue, 3 Dec 2024 11:20:24 +0100 Subject: [PATCH] fix(environment): Make SSL variables optional (#8843) Previously, SSL_KEY_PATH and SSL_CERT_PATH were required if the SERVER_URL started with 'https'. This change makes these variables optional, allowing greater flexibility in dealing with SSL configurations. This update helps in scenarios where SSL paths are managed differently or not needed. --- .../engine/core-modules/environment/environment-variables.ts | 4 ++-- 1 file changed, 2 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 94e7a2a83d17d..1fbc08d872771 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 @@ -473,11 +473,11 @@ export class EnvironmentVariables { // SSL @IsString() - @ValidateIf((env) => env.SERVER_URL.startsWith('https')) + @IsOptional() SSL_KEY_PATH: string; @IsString() - @ValidateIf((env) => env.SERVER_URL.startsWith('https')) + @IsOptional() SSL_CERT_PATH: string; }