Skip to content

Commit

Permalink
Add the pass host header section to the services documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jbdoumenjou authored and traefiker committed Sep 30, 2019
1 parent 4c5250e commit 211fa18
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/content/routing/providers/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ you'd add the label `traefik.http.services.<name-of-your-choice>.loadbalancer.pa
```

??? info "`traefik.http.services.<service_name>.loadbalancer.passhostheader`"
<!-- TODO doc passHostHeader in services page -->

See [pass Host header](../services/index.md#pass-host-header) for more information.

```yaml
- "traefik.http.services.myservice.loadbalancer.passhostheader=true"
Expand Down
3 changes: 2 additions & 1 deletion docs/content/routing/providers/marathon.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ For example, to change the passHostHeader behavior, you'd add the label `"traefi
```

??? info "`traefik.http.services.<service_name>.loadbalancer.passhostheader`"
<!-- TODO doc passHostHeader in services page -->

See [pass Host header](../services/index.md#pass-host-header) for more information.

```json
"traefik.http.services.myservice.loadbalancer.passhostheader": "true"
Expand Down
3 changes: 2 additions & 1 deletion docs/content/routing/providers/rancher.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ you'd add the label `traefik.http.services.{name-of-your-choice}.loadbalancer.pa
```

??? info "`traefik.http.services.<service_name>.loadbalancer.passhostheader`"
<!-- TODO doc passHostHeader in services page -->

See [pass Host header](../services/index.md#pass-host-header) for more information.

```yaml
- "traefik.http.services.myservice.loadbalancer.passhostheader=true"
Expand Down
25 changes: 25 additions & 0 deletions docs/content/routing/services/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 211fa18

Please sign in to comment.