From 1279f51d005b3559c4b66f1147851717f89e0b8a Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 5 Jun 2024 16:33:29 -0400 Subject: [PATCH] fix: Handle URL with trailing / correctly. --- cmd/korrel8rcli/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/korrel8rcli/main.go b/cmd/korrel8rcli/main.go index 001d925..fdafcbb 100644 --- a/cmd/korrel8rcli/main.go +++ b/cmd/korrel8rcli/main.go @@ -55,7 +55,7 @@ func newClient() *client.RESTAPI { } u, err := url.Parse(*korrel8rURL) check(err) - if u.Path == "" { + if u.Path == "" || u.Path == "/" { u.Path = client.DefaultBasePath } return client.New(httptransport.New(u.Host, u.Path, []string{u.Scheme}), nil)