From 4595bd6a1ae1165ef497251ad85c646dadc8a925 Mon Sep 17 00:00:00 2001 From: James Ranson Date: Thu, 4 Feb 2021 10:55:52 -0700 Subject: [PATCH] 1.1 backport via (#533) * fix health check header append defect * increment version --- cmd/trickster/main.go | 2 +- pkg/proxy/origins/clickhouse/handler_health.go | 2 +- pkg/proxy/origins/irondb/handler_health.go | 2 +- pkg/proxy/origins/prometheus/handler_health.go | 2 +- pkg/proxy/origins/reverseproxycache/handler_health.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/trickster/main.go b/cmd/trickster/main.go index d064008ee..d1803190e 100644 --- a/cmd/trickster/main.go +++ b/cmd/trickster/main.go @@ -33,7 +33,7 @@ var ( const ( applicationName = "trickster" - applicationVersion = "1.1.4" + applicationVersion = "1.1.5" ) var fatalStartupErrors = true diff --git a/pkg/proxy/origins/clickhouse/handler_health.go b/pkg/proxy/origins/clickhouse/handler_health.go index 75be20ea9..481337431 100644 --- a/pkg/proxy/origins/clickhouse/handler_health.go +++ b/pkg/proxy/origins/clickhouse/handler_health.go @@ -49,7 +49,7 @@ func (c *Client) HealthHandler(w http.ResponseWriter, r *http.Request) { rsc := request.GetResources(r) req = req.WithContext(tctx.WithHealthCheckFlag(tctx.WithResources(context.Background(), rsc), true)) - req.Header = c.healthHeaders + req.Header = c.healthHeaders.Clone() engines.DoProxy(w, req, true) } diff --git a/pkg/proxy/origins/irondb/handler_health.go b/pkg/proxy/origins/irondb/handler_health.go index dcb8e0f4c..6045ef7cf 100644 --- a/pkg/proxy/origins/irondb/handler_health.go +++ b/pkg/proxy/origins/irondb/handler_health.go @@ -43,7 +43,7 @@ func (c *Client) HealthHandler(w http.ResponseWriter, r *http.Request) { rsc := request.GetResources(r) req = req.WithContext(tctx.WithHealthCheckFlag(tctx.WithResources(context.Background(), rsc), true)) - req.Header = c.healthHeaders + req.Header = c.healthHeaders.Clone() engines.DoProxy(w, req, true) } diff --git a/pkg/proxy/origins/prometheus/handler_health.go b/pkg/proxy/origins/prometheus/handler_health.go index 5c6015b11..76b488fb8 100644 --- a/pkg/proxy/origins/prometheus/handler_health.go +++ b/pkg/proxy/origins/prometheus/handler_health.go @@ -45,7 +45,7 @@ func (c *Client) HealthHandler(w http.ResponseWriter, r *http.Request) { rsc := request.GetResources(r) req = req.WithContext(tctx.WithHealthCheckFlag(tctx.WithResources(context.Background(), rsc), true)) - req.Header = c.healthHeaders + req.Header = c.healthHeaders.Clone() engines.DoProxy(w, req, true) } diff --git a/pkg/proxy/origins/reverseproxycache/handler_health.go b/pkg/proxy/origins/reverseproxycache/handler_health.go index f41d25293..259b3c1a5 100644 --- a/pkg/proxy/origins/reverseproxycache/handler_health.go +++ b/pkg/proxy/origins/reverseproxycache/handler_health.go @@ -44,7 +44,7 @@ func (c *Client) HealthHandler(w http.ResponseWriter, r *http.Request) { rsc := request.GetResources(r) req = req.WithContext(tctx.WithHealthCheckFlag(tctx.WithResources(context.Background(), rsc), true)) - req.Header = c.healthHeaders + req.Header = c.healthHeaders.Clone() engines.DoProxy(w, req, true) }