aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/client-api-proxy/main.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/client-api-proxy/main.go b/cmd/client-api-proxy/main.go
index 979b0b04..ebc0629f 100644
--- a/cmd/client-api-proxy/main.go
+++ b/cmd/client-api-proxy/main.go
@@ -58,9 +58,8 @@ var (
)
func makeProxy(targetURL string) (*httputil.ReverseProxy, error) {
- if !strings.HasSuffix(targetURL, "/") {
- targetURL += "/"
- }
+ targetURL = strings.TrimSuffix(targetURL, "/")
+
// Check that we can parse the URL.
_, err := url.Parse(targetURL)
if err != nil {