Skip to content

Commit

Permalink
doc: sameSite.
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Mar 22, 2020
1 parent a0cf930 commit 89a1468
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
- "traefik.http.services.service01.loadbalancer.sticky.cookie.httponly=true"
- "traefik.http.services.service01.loadbalancer.sticky.cookie.name=foobar"
- "traefik.http.services.service01.loadbalancer.sticky.cookie.secure=true"
- "traefik.http.services.service01.loadbalancer.sticky.cookie.samesite=foobar"
- "traefik.http.services.service01.loadbalancer.server.port=foobar"
- "traefik.http.services.service01.loadbalancer.server.scheme=foobar"
- "traefik.tcp.routers.tcprouter0.entrypoints=foobar, foobar"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/reference/dynamic-configuration/file.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
name = "foobar"
secure = true
httpOnly = true
sameSite = "foobar"

[[http.services.Service01.loadBalancer.servers]]
url = "foobar"
Expand Down Expand Up @@ -87,6 +88,7 @@
name = "foobar"
secure = true
httpOnly = true
sameSite = "foobar"
[http.middlewares]
[http.middlewares.Middleware00]
[http.middlewares.Middleware00.addPrefix]
Expand Down
2 changes: 2 additions & 0 deletions docs/content/reference/dynamic-configuration/file.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ http:
name: foobar
secure: true
httpOnly: true
sameSite: foobar
servers:
- url: foobar
- url: foobar
Expand Down Expand Up @@ -88,6 +89,7 @@ http:
name: foobar
secure: true
httpOnly: true
sameSite: foobar
middlewares:
Middleware00:
addPrefix:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
"traefik.http.services.service01.loadbalancer.sticky.cookie.httponly": "true",
"traefik.http.services.service01.loadbalancer.sticky.cookie.name": "foobar",
"traefik.http.services.service01.loadbalancer.sticky.cookie.secure": "true",
"traefik.http.services.service01.loadbalancer.sticky.cookie.samesite": "foobar",
"traefik.http.services.service01.loadbalancer.server.port": "foobar",
"traefik.http.services.service01.loadbalancer.server.scheme": "foobar",
"traefik.tcp.routers.tcprouter0.entrypoints": "foobar, foobar",
Expand Down
8 changes: 8 additions & 0 deletions docs/content/routing/providers/consul-catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,14 @@ you'd add the tag `traefik.http.services.{name-of-your-choice}.loadbalancer.pass
traefik.http.services.myservice.loadbalancer.sticky.cookie.secure=true
```

??? info "`traefik.http.services.<service_name>.loadbalancer.sticky.cookie.samesite`"

See [sticky sessions](../services/index.md#sticky-sessions) for more information.

```yaml
traefik.http.services.myservice.loadbalancer.sticky.cookie.samesite=none
```

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

Expand Down
8 changes: 8 additions & 0 deletions docs/content/routing/providers/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,14 @@ you'd add the label `traefik.http.services.<name-of-your-choice>.loadbalancer.pa
- "traefik.http.services.myservice.loadbalancer.sticky.cookie.secure=true"
```

??? info "`traefik.http.services.<service_name>.loadbalancer.sticky.cookie.samesite`"

See [sticky sessions](../services/index.md#sticky-sessions) for more information.

```yaml
traefik.http.services.myservice.loadbalancer.sticky.cookie.samesite=none
```

??? info "`traefik.http.services.<service_name>.loadbalancer.responseforwarding.flushinterval`"

See [response forwarding](../services/index.md#response-forwarding) for more information.
Expand Down
1 change: 1 addition & 0 deletions docs/content/routing/providers/kubernetes-crd.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ Register the `IngressRoute` kind in the Kubernetes cluster before creating `Ingr
httpOnly: true
name: cookie
secure: true
sameSite: none
strategy: RoundRobin
weight: 10
tls: # [9]
Expand Down
8 changes: 8 additions & 0 deletions docs/content/routing/providers/marathon.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,14 @@ For example, to change the passHostHeader behavior, you'd add the label `"traefi
"traefik.http.services.myservice.loadbalancer.sticky.cookie.secure": "true"
```

??? info "`traefik.http.services.<service_name>.loadbalancer.sticky.cookie.samesite`"

See [sticky sessions](../services/index.md#sticky-sessions) for more information.

```yaml
traefik.http.services.myservice.loadbalancer.sticky.cookie.samesite=none
```

??? info "`traefik.http.services.<service_name>.loadbalancer.responseforwarding.flushinterval`"

See [response forwarding](../services/index.md#response-forwarding) for more information.
Expand Down
8 changes: 8 additions & 0 deletions docs/content/routing/providers/rancher.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,14 @@ you'd add the label `traefik.http.services.{name-of-your-choice}.loadbalancer.pa
- "traefik.http.services.myservice.loadbalancer.sticky.cookie.secure=true"
```

??? info "`traefik.http.services.<service_name>.loadbalancer.sticky.cookie.samesite`"

See [sticky sessions](../services/index.md#sticky-sessions) for more information.

```yaml
traefik.http.services.myservice.loadbalancer.sticky.cookie.samesite=none
```

??? info "`traefik.http.services.<service_name>.loadbalancer.responseforwarding.flushinterval`"

See [response forwarding](../services/index.md#response-forwarding) for more information.
Expand Down
8 changes: 6 additions & 2 deletions docs/content/routing/services/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,12 @@ On subsequent requests, the client is forwarded to the same server.

The default cookie name is an abbreviation of a sha1 (ex: `_1d52e`).

!!! info "Secure & HTTPOnly flags"
!!! info "Secure & HTTPOnly & SameSite flags"

By default, the affinity cookie is created without those flags. One however can change that through configuration.
By default, the affinity cookie is created without those flags.
One however can change that through configuration.

`SameSite` can be `none`, `lax`, `strict` or empty.

??? example "Adding Stickiness -- Using the [File Provider](../../providers/file.md)"

Expand Down Expand Up @@ -189,6 +192,7 @@ On subsequent requests, the client is forwarded to the same server.
name = "my_sticky_cookie_name"
secure = true
httpOnly = true
sameSite = "none"
```

```yaml tab="YAML"
Expand Down

0 comments on commit 89a1468

Please sign in to comment.