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.
This commit is contained in:
Antoine Moreaux 2024-12-03 11:20:24 +01:00 committed by GitHub
parent d0ff1ffd5f
commit 7b2d9894f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -473,11 +473,11 @@ export class EnvironmentVariables {
// SSL // SSL
@IsString() @IsString()
@ValidateIf((env) => env.SERVER_URL.startsWith('https')) @IsOptional()
SSL_KEY_PATH: string; SSL_KEY_PATH: string;
@IsString() @IsString()
@ValidateIf((env) => env.SERVER_URL.startsWith('https')) @IsOptional()
SSL_CERT_PATH: string; SSL_CERT_PATH: string;
} }