From 0ee77ef0c62abbd6283caea989a10300b8bf84d6 Mon Sep 17 00:00:00 2001 From: Samir Faci Date: Thu, 28 Dec 2023 14:30:39 -0600 Subject: [PATCH] Fixing bug with reverse proxy path Addresses latter part of #224 --- internal/service/login.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/service/login.go b/internal/service/login.go index d12cae12..4194d7a1 100644 --- a/internal/service/login.go +++ b/internal/service/login.go @@ -29,10 +29,14 @@ func (s *DashNGoImpl) Login() { if err != nil { log.Fatal("invalid Grafana URL") } + path, err := url.JoinPath(u.Path, "/api") + if err != nil { + log.Fatal("invalid Grafana URL Path") + } var clientTransport *http.Transport httpTransportCfg := client.TransportConfig{ Host: u.Host, - BasePath: "/api", + BasePath: path, Schemes: []string{u.Scheme}, //NumRetries: 3, }