From 211fa18ac29c4e91fbf30fa66e6f5f63abf1b7c1 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Doumenjou Date: Mon, 30 Sep 2019 11:26:06 +0200 Subject: [PATCH] Add the pass host header section to the services documentation --- docs/content/routing/providers/docker.md | 3 ++- docs/content/routing/providers/marathon.md | 3 ++- docs/content/routing/providers/rancher.md | 3 ++- docs/content/routing/services/index.md | 25 ++++++++++++++++++++++ 4 files changed, 31 insertions(+), 3 deletions(-) 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.