From 2b3708c718f5b517f4b6995ad1a501dd18acc6e9 Mon Sep 17 00:00:00 2001 From: Audiobuzz Date: Sun, 5 Jul 2026 00:24:10 +0000 Subject: [PATCH] fleet-manager: register-admin link uses the first of multiple RP origins Follow-up to comma-separated RP_ORIGIN support: the enrolment URL builder used the raw origin string, which would embed the whole comma list. Take the first origin for the link. --- serving/fleet-manager/cli.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/serving/fleet-manager/cli.go b/serving/fleet-manager/cli.go index b2f4d1e..13855e6 100644 --- a/serving/fleet-manager/cli.go +++ b/serving/fleet-manager/cli.go @@ -150,7 +150,13 @@ func runRegisterAdmin(args []string) int { fmt.Fprintf(os.Stderr, "mint: %v\n", err) return 1 } - base := strings.TrimRight(*origin, "/") + // RP_ORIGIN may list several origins (comma-separated); the enrolment link + // uses the first one. + base := *origin + if i := strings.IndexByte(base, ','); i >= 0 { + base = base[:i] + } + base = strings.TrimRight(strings.TrimSpace(base), "/") if base == "" { base = "https://" }