Skip to content

Commit

Permalink
Qfix: use http for local and test brandings (#5980)
Browse files Browse the repository at this point in the history
Signed-off-by: Jasmin <jasmin@hardcoreeng.com>
  • Loading branch information
lexiv0re authored and JasminMus committed Jul 2, 2024
1 parent 3807267 commit a567546
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/core/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export interface Branding {
language?: string
initWorkspace?: string
lastNameFirst?: string
protocol?: string
}

export type BrandingMap = Record<string, Branding>
3 changes: 2 additions & 1 deletion server/core/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}/`
}
}

Expand Down
2 changes: 2 additions & 0 deletions tests/branding-test.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"localhost:8083": {
"key": "huly",
"title": "Platform",
"protocol": "http",
"languages": "en,ru,pt,es,zh,fr",
"defaultLanguage": "en",
"defaultApplication": "tracker",
Expand Down

0 comments on commit a567546

Please sign in to comment.