From 07d7f02720c1aa6bc7d7a743f3c46bcbcdf0a161 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 6 Feb 2025 16:32:10 +0530 Subject: [PATCH] Handle multiple domains in records in status API --- src/deployments.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.45.2