Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

query: Fix external prefix and add an e2e test for it #2800

Merged
merged 12 commits into from
Jul 2, 2020
Prev Previous commit
Make changes according to Lucas' suggestions
Signed-off-by: Prem Kumar <prmsrswt@gmail.com>
onprem committed Jul 2, 2020
commit 577fb164845ca113d0db90e96fbae12a7f46d4f8
2 changes: 1 addition & 1 deletion cmd/thanos/query.go
Original file line number Diff line number Diff line change
@@ -144,7 +144,7 @@ func registerQuery(m map[string]setupFunc, app *kingpin.Application) {
}

if *webRoutePrefix != *webExternalPrefix {
level.Warn(logger).Log("msg", "different values for --web.route-prefix and --web.external-prefix detected. WebUI may not work without a reverse-proxy")
level.Warn(logger).Log("msg", "different values for --web.route-prefix and --web.external-prefix detected, web UI may not work without a reverse-proxy.")
}

promql.SetDefaultEvaluationInterval(time.Duration(*defaultEvaluationInterval))
2 changes: 1 addition & 1 deletion docs/operating/reverse-proxy.md
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ slug: /reverse-proxy.md

# Running Thanos behind a reverse proxy

There are many reasons to use a [reverse proxy](https://www.nginx.com/resources/glossary/reverse-proxy-server/) in front of Thanos. For example, SSL termination (serve Thanos over HTTPS) and basic authentication. This small guide will tell you how to do that.
There are many reasons to use a [reverse proxy](https://www.nginx.com/resources/glossary/reverse-proxy-server/) in front of Thanos, for example, TLS termination (serve Thanos over HTTPS) and basic authentication. This small guide will tell you how to do that.

## External Prefix and Route Prefix

5 changes: 0 additions & 5 deletions test/e2e/e2ethanos/helpers.go
Original file line number Diff line number Diff line change
@@ -50,11 +50,6 @@ func NewSingleHostReverseProxy(target *url.URL, externalPrefix string) *httputil
} else {
req.URL.RawQuery = targetQuery + "&" + req.URL.RawQuery
}

if _, ok := req.Header["User-Agent"]; !ok {
// Explicitly disable User-Agent so it's not set to default value.
req.Header.Set("User-Agent", "")
}
}
return &httputil.ReverseProxy{Director: director}
}