Remove custom: from hostnames (label) (#1)

Remove custom: from hostname
This commit is contained in:
FloppyDisk 2023-11-16 14:37:16 +13:00 committed by GitHub
parent e0a55f9c0e
commit abfa8b40e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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"

View File

@ -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