refactor(domain-manager): simplify frontend URL configuration (#10194)
Replaced multiple environment variables for frontend URL construction with a single FRONTEND_URL variable. This change reduces complexity and improves clarity by consolidating frontend URL handling into one source. Updated relevant validations and removed unused variables like FRONT_PROTOCOL and FRONT_PORT. Fix #10016
This commit is contained in:
@ -551,11 +551,11 @@ export class EnvironmentVariables {
|
||||
|
||||
@EnvironmentVariablesMetadata({
|
||||
group: EnvironmentVariablesGroup.ServerConfig,
|
||||
description: 'Domain for the frontend application',
|
||||
description: 'Url for the frontend application',
|
||||
})
|
||||
@IsString()
|
||||
@IsUrl({ require_tld: false, require_protocol: true })
|
||||
@IsOptional()
|
||||
FRONT_DOMAIN?: string;
|
||||
FRONTEND_URL: string;
|
||||
|
||||
@EnvironmentVariablesMetadata({
|
||||
group: EnvironmentVariablesGroup.ServerConfig,
|
||||
@ -566,23 +566,6 @@ export class EnvironmentVariables {
|
||||
@ValidateIf((env) => env.IS_MULTIWORKSPACE_ENABLED)
|
||||
DEFAULT_SUBDOMAIN = 'app';
|
||||
|
||||
@EnvironmentVariablesMetadata({
|
||||
group: EnvironmentVariablesGroup.ServerConfig,
|
||||
description: 'Protocol for the frontend application (http or https)',
|
||||
})
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
FRONT_PROTOCOL?: 'http' | 'https' = 'http';
|
||||
|
||||
@EnvironmentVariablesMetadata({
|
||||
group: EnvironmentVariablesGroup.ServerConfig,
|
||||
description: 'Port for the frontend application',
|
||||
})
|
||||
@CastToPositiveNumber()
|
||||
@IsNumber()
|
||||
@IsOptional()
|
||||
FRONT_PORT?: number;
|
||||
|
||||
@EnvironmentVariablesMetadata({
|
||||
group: EnvironmentVariablesGroup.Other,
|
||||
description: 'ID for the Chrome extension',
|
||||
|
||||
Reference in New Issue
Block a user