diff --git a/CHANGELOG.md b/CHANGELOG.md index d64e641089..53e15bc564 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ We use *breaking* word for marking changes that are not backward compatible (rel - [#2416](https://github.com/thanos-io/thanos/pull/2416) Bucket: fixes issue #2416 bug in `inspect --sort-by` doesn't work correctly in all cases - [#2411](https://github.com/thanos-io/thanos/pull/2411) Query: fix a bug where queries might not time out sometimes due to issues with one or more StoreAPIs +- [##2484](https://github.com/thanos-io/thanos/pull/2484) Query/Ruler: fix issue #2483, when web.route-prefix is set, it is added twice in http router prefix. ### Added diff --git a/cmd/thanos/query.go b/cmd/thanos/query.go index a21565c59a..2735cd76c2 100644 --- a/cmd/thanos/query.go +++ b/cmd/thanos/query.go @@ -8,7 +8,6 @@ import ( "fmt" "math" "net/http" - "path" "strings" "time" @@ -357,7 +356,7 @@ func runQuery( api := v1.NewAPI(logger, reg, engine, queryableCreator, enableAutodownsampling, enablePartialResponse, replicaLabels, instantDefaultMaxSourceResolution) - api.Register(router.WithPrefix(path.Join(webRoutePrefix, "/api/v1")), tracer, logger, ins) + api.Register(router.WithPrefix("/api/v1"), tracer, logger, ins) srv := httpserver.New(logger, reg, comp, httpProbe, httpserver.WithListen(httpBindAddr), diff --git a/cmd/thanos/rule.go b/cmd/thanos/rule.go index 3c021dec2b..33889f7c99 100644 --- a/cmd/thanos/rule.go +++ b/cmd/thanos/rule.go @@ -8,7 +8,6 @@ import ( "math/rand" "net/http" "net/url" - "path" "path/filepath" "strconv" "strings" @@ -576,7 +575,7 @@ func runRule( ui.NewRuleUI(logger, reg, ruleMgr, alertQueryURL.String(), webExternalPrefix, webPrefixHeaderName).Register(router, ins) api := v1.NewAPI(logger, reg, ruleMgr) - api.Register(router.WithPrefix(path.Join(webRoutePrefix, "/api/v1")), tracer, logger, ins) + api.Register(router.WithPrefix("/api/v1"), tracer, logger, ins) srv := httpserver.New(logger, reg, comp, httpProbe, httpserver.WithListen(httpBindAddr),