diff --git a/docs/content/routing/providers/docker.md b/docs/content/routing/providers/docker.md index 83730cdc0..5726c21bd 100644 --- a/docs/content/routing/providers/docker.md +++ b/docs/content/routing/providers/docker.md @@ -237,7 +237,8 @@ you'd add the label `traefik.http.services..loadbalancer.pa ``` ??? info "`traefik.http.services..loadbalancer.passhostheader`" - + + See [pass Host header](../services/index.md#pass-host-header) for more information. ```yaml - "traefik.http.services.myservice.loadbalancer.passhostheader=true" diff --git a/docs/content/routing/providers/marathon.md b/docs/content/routing/providers/marathon.md index 2160932de..13e730eb5 100644 --- a/docs/content/routing/providers/marathon.md +++ b/docs/content/routing/providers/marathon.md @@ -157,7 +157,8 @@ For example, to change the passHostHeader behavior, you'd add the label `"traefi ``` ??? info "`traefik.http.services..loadbalancer.passhostheader`" - + + See [pass Host header](../services/index.md#pass-host-header) for more information. ```json "traefik.http.services.myservice.loadbalancer.passhostheader": "true" diff --git a/docs/content/routing/providers/rancher.md b/docs/content/routing/providers/rancher.md index 6406cf227..17c220457 100644 --- a/docs/content/routing/providers/rancher.md +++ b/docs/content/routing/providers/rancher.md @@ -163,7 +163,8 @@ you'd add the label `traefik.http.services.{name-of-your-choice}.loadbalancer.pa ``` ??? info "`traefik.http.services..loadbalancer.passhostheader`" - + + See [pass Host header](../services/index.md#pass-host-header) for more information. ```yaml - "traefik.http.services.myservice.loadbalancer.passhostheader=true" diff --git a/docs/content/routing/services/index.md b/docs/content/routing/services/index.md index 95c79c57f..f9924677a 100644 --- a/docs/content/routing/services/index.md +++ b/docs/content/routing/services/index.md @@ -322,6 +322,31 @@ Below are the available options for the health check mechanism: My-Header: bar ``` +#### Pass Host Header + +The `passHostHeader` allows to forward client Host header to server. + +By default, `passHostHeader` is true. + +??? example "Don't forward the host header -- Using the [File Provider](../../providers/file.md)" + + ```toml tab="TOML" + ## Dynamic configuration + [http.services] + [http.services.Service01] + [http.services.Service01.loadBalancer] + passHostHeader = false + ``` + + ```yaml tab="YAML" + ## Dynamic configuration + http: + services: + Service01: + loadBalancer: + passHostHeader: false + ``` + ### Weighted Round Robin (service) The WRR is able to load balance the requests between multiple services based on weights.