Skip to content

Commit

Permalink
fix url of apps with FQDN alias
Browse files Browse the repository at this point in the history
  • Loading branch information
yusing committed Jan 10, 2025
1 parent 8efee21 commit eba9a2f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion types/homepage_item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ export async function getHomepageItems() {
for (const item of category) {
// if an override url is not set, use the default
if (item.url == "") {
item.url = `${window.location.protocol}//${item.alias}.${currentHostname}/`;
let fqdn: string;
if (item.alias.includes(".")) {
fqdn = item.alias;
} else {
fqdn = `${item.alias}.${currentHostname}`;
}
item.url = `${window.location.protocol}//${fqdn}/`;
}
}
}
Expand Down

0 comments on commit eba9a2f

Please sign in to comment.