From 521f5632d74e9edf6110653f4d5a09145dbd2535 Mon Sep 17 00:00:00 2001 From: Mads Jon Nielsen Date: Wed, 3 Jan 2024 10:37:41 +0100 Subject: [PATCH] Just use c.String("metrics") Co-authored-by: Julien Laffaye --- cmd/cloudflared/tunnel/subcommands.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/cloudflared/tunnel/subcommands.go b/cmd/cloudflared/tunnel/subcommands.go index 62605c89..b0084443 100644 --- a/cmd/cloudflared/tunnel/subcommands.go +++ b/cmd/cloudflared/tunnel/subcommands.go @@ -412,7 +412,7 @@ func buildHealthCommand() *cli.Command { func healthCommand(c *cli.Context) error { metrics := strings.Split(c.String("metrics"), ":") - requestURL := fmt.Sprintf("http://%s:%s/ready", metrics[0], metrics[1]) + requestURL := fmt.Sprintf("http://%s/ready", c.String("metrics")) res, err := http.Get(requestURL) if err != nil { return err