From 37210ff661a8f4f13415d6f7c11084cdb7776629 Mon Sep 17 00:00:00 2001 From: Mads Jon Nielsen Date: Tue, 23 Apr 2024 08:20:53 +0200 Subject: [PATCH] Use /healthcheck over /ready --- cmd/cloudflared/tunnel/subcommands.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/cloudflared/tunnel/subcommands.go b/cmd/cloudflared/tunnel/subcommands.go index 9e99aa15..98d97beb 100644 --- a/cmd/cloudflared/tunnel/subcommands.go +++ b/cmd/cloudflared/tunnel/subcommands.go @@ -411,13 +411,13 @@ func buildHealthCommand() *cli.Command { } func healthCommand(c *cli.Context) error { - requestURL := fmt.Sprintf("http://%s/ready", c.String("metrics")) + requestURL := fmt.Sprintf("http://%s/healthcheck", c.String("metrics")) res, err := http.Get(requestURL) if err != nil { return err } if res.StatusCode != 200 { - return fmt.Errorf("health /ready endpoint returned status code %d", res.StatusCode) + return fmt.Errorf("health /ready endpoint returned status code %d\n%s", res.StatusCode, res.Body) } return nil }