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://" }