diff --git a/packages/core/src/server.ts b/packages/core/src/server.ts index 5e41bd7dc8..f6456af0a5 100644 --- a/packages/core/src/server.ts +++ b/packages/core/src/server.ts @@ -75,6 +75,7 @@ export interface Branding { language?: string initWorkspace?: string lastNameFirst?: string + protocol?: string } export type BrandingMap = Record diff --git a/server/core/src/utils.ts b/server/core/src/utils.ts index a7c788c00d..1d65b82a90 100644 --- a/server/core/src/utils.ts +++ b/server/core/src/utils.ts @@ -192,7 +192,8 @@ export function loadBrandingMap (brandingPath?: string): BrandingMap { brandings = JSON.parse(fs.readFileSync(brandingPath, 'utf8')) for (const [host, value] of Object.entries(brandings)) { - value.front = `https://${host}/` + const protocol = value.protocol ?? 'https' + value.front = `${protocol}://${host}/` } } diff --git a/tests/branding-test.json b/tests/branding-test.json index 56c169ddfe..6964e55766 100644 --- a/tests/branding-test.json +++ b/tests/branding-test.json @@ -1,6 +1,8 @@ { "localhost:8083": { + "key": "huly", "title": "Platform", + "protocol": "http", "languages": "en,ru,pt,es,zh,fr", "defaultLanguage": "en", "defaultApplication": "tracker",