Merge branch v2.2 into v2.3

This commit is contained in:
Fernandez Ludovic 2020-09-07 16:30:17 +02:00
commit 8474a61f21
3 changed files with 30 additions and 2 deletions

View file

@ -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))

View file

@ -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).

View file

@ -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()
}
}