From eb7a6d925bac94679138adf9ec9157a0da44d37b Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Mon, 7 Sep 2020 09:26:03 +0200 Subject: [PATCH 1/3] fix: header middleware response writer. --- pkg/middlewares/headers/responsewriter.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pkg/middlewares/headers/responsewriter.go b/pkg/middlewares/headers/responsewriter.go index 274a58181..899e8259c 100644 --- a/pkg/middlewares/headers/responsewriter.go +++ b/pkg/middlewares/headers/responsewriter.go @@ -1,6 +1,9 @@ package headers import ( + "bufio" + "fmt" + "net" "net/http" "github.com/containous/traefik/v2/pkg/log" @@ -73,3 +76,19 @@ func (w *responseModifier) Write(b []byte) (int, error) { return w.w.Write(b) } + +// Hijack hijacks the connection. +func (w *responseModifier) Hijack() (net.Conn, *bufio.ReadWriter, error) { + if h, ok := w.w.(http.Hijacker); ok { + return h.Hijack() + } + + return nil, nil, fmt.Errorf("not a hijacker: %T", w.w) +} + +// Flush sends any buffered data to the client. +func (w *responseModifier) Flush() { + if flusher, ok := w.w.(http.Flusher); ok { + flusher.Flush() + } +} From 2045b250fdd294a9bdaa59be83708b1eb3bfc9e2 Mon Sep 17 00:00:00 2001 From: Andrew Savinykh <658865+AndrewSav@users.noreply.github.com> Date: Mon, 7 Sep 2020 20:30:04 +1200 Subject: [PATCH 2/3] Clarified hostname documentation for load balancer healthcheck --- docs/content/routing/services/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/routing/services/index.md b/docs/content/routing/services/index.md index 7a85a0039..cbc271dfc 100644 --- a/docs/content/routing/services/index.md +++ b/docs/content/routing/services/index.md @@ -317,7 +317,7 @@ Below are the available options for the health check mechanism: - `path` is appended to the server URL to set the health check endpoint. - `scheme`, if defined, will replace the server URL `scheme` for the health check endpoint -- `hostname`, if defined, will replace the server URL `hostname` for the health check endpoint. +- `hostname`, if defined, will apply `Host` header `hostname` to the the health check request. - `port`, if defined, will replace the server URL `port` for the health check endpoint. - `interval` defines the frequency of the health check calls. - `timeout` defines the maximum duration Traefik will wait for a health check request before considering the server failed (unhealthy). From 4ad0ab5433b2be0789714aad079d8063da4026c5 Mon Sep 17 00:00:00 2001 From: Romain Date: Mon, 7 Sep 2020 16:00:03 +0200 Subject: [PATCH 3/3] Prepare release v2.2.11 --- CHANGELOG.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50960bbbb..cb3da54af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ +## [v2.2.11](https://github.com/containous/traefik/tree/v2.2.11) (2020-09-07) +[All Commits](https://github.com/containous/traefik/compare/v2.2.10...v2.2.11) + +**Bug fixes:** +- **[middleware]** fix: header middleware response writer. ([#7252](https://github.com/containous/traefik/pull/7252) by [ldez](https://github.com/ldez)) + +**Documentation:** +- **[healthcheck]** Clarified hostname documentation for load balancer healthcheck ([#7254](https://github.com/containous/traefik/pull/7254) by [AndrewSav](https://github.com/AndrewSav)) + ## [v2.2.10](https://github.com/containous/traefik/tree/v2.2.10) (2020-09-04) -[All Commits](https://github.com/containous/traefik/compare/v2.2.0...v2.2.10) +[All Commits](https://github.com/containous/traefik/compare/v2.2.7...v2.2.10) **Bug fixes:** - **[acme]** Update go-acme/lego to v4.0.1 ([#7238](https://github.com/containous/traefik/pull/7238) by [ldez](https://github.com/ldez))