diff --git a/src/deployments.ts b/src/deployments.ts index b30f630..122cd83 100644 --- a/src/deployments.ts +++ b/src/deployments.ts @@ -159,7 +159,9 @@ export class RegHelper { } status.app = r.attributes.application; - const hostname = r.attributes.dns ?? generateHostnameForApp(app); + + const dnsList: string[] = r.attributes.dns ? r.attributes.dns.split(",") : []; + const hostname = dnsList.length ? dnsList[dnsList.length - 1] : generateHostnameForApp(app); if (deploymentsByRequest.has(r.id)) { const deployment = deploymentsByRequest.get(r.id);