From abfa8b40e4216845ce6113e75dba3a3e7fd97db9 Mon Sep 17 00:00:00 2001 From: FloppyDisk <97422942+flpydsk@users.noreply.github.com> Date: Thu, 16 Nov 2023 14:37:16 +1300 Subject: [PATCH] Remove custom: from hostnames (label) (#1) Remove custom: from hostname --- component-tests/test_management.py | 2 +- management/service.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/component-tests/test_management.py b/component-tests/test_management.py index 5ebbc5ed..8ea217ad 100644 --- a/component-tests/test_management.py +++ b/component-tests/test_management.py @@ -40,7 +40,7 @@ class TestManagement: # Assert response json. assert resp.status_code == 200, "Expected cloudflared to return 200 for host details" - assert resp.json()["hostname"] == "custom:test", "Expected cloudflared to return hostname" + assert resp.json()["hostname"] == "test", "Expected cloudflared to return hostname" assert resp.json()["ip"] != "", "Expected cloudflared to return ip" assert resp.json()["connector_id"] == connector_id, "Expected cloudflared to return connector_id" diff --git a/management/service.go b/management/service.go index dfee0aea..2c8daf9c 100644 --- a/management/service.go +++ b/management/service.go @@ -134,7 +134,7 @@ func (m *ManagementService) getHostDetails(w http.ResponseWriter, r *http.Reques func (m *ManagementService) getLabel() string { if m.label != "" { - return fmt.Sprintf("custom:%s", m.label) + return fmt.Sprintf("%s", m.label) } // If no label is provided we return the system hostname. This is not