Adds middlewares examples for k8s.
This commit is contained in:
parent
336135c392
commit
07d0eb9ae6
16 changed files with 552 additions and 261 deletions
|
@ -9,33 +9,40 @@ RegexRedirect redirect request from a scheme to another.
|
|||
|
||||
## Configuration Examples
|
||||
|
||||
??? example "File -- Redirect to https"
|
||||
```yaml tab="Docker"
|
||||
# Redirect to https
|
||||
labels:
|
||||
- "traefik.http.middlewares.test-redirectscheme.redirectscheme.scheme=https"
|
||||
```
|
||||
|
||||
```toml
|
||||
[http.middlewares]
|
||||
[http.middlewares.test-redirectscheme.redirectscheme]
|
||||
scheme = "https"
|
||||
```
|
||||
```yaml tab="Kubernetes"
|
||||
# Redirect to https
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: test-redirectscheme
|
||||
spec:
|
||||
redirectScheme:
|
||||
scheme: https
|
||||
```
|
||||
|
||||
??? example "Docker -- Redirect to https"
|
||||
|
||||
```yml
|
||||
a-container:
|
||||
image: a-container-image
|
||||
labels:
|
||||
- "traefik.http.middlewares.test-redirectscheme.redirectscheme.scheme=https"
|
||||
```
|
||||
```toml tab="File"
|
||||
# Redirect to https
|
||||
[http.middlewares]
|
||||
[http.middlewares.test-redirectscheme.redirectscheme]
|
||||
scheme = "https"
|
||||
```
|
||||
|
||||
## Configuration Options
|
||||
|
||||
### permanent
|
||||
### `permanent`
|
||||
|
||||
Set the `permanent` option to `true` to apply a permanent redirection.
|
||||
|
||||
### scheme
|
||||
### `scheme`
|
||||
|
||||
The `scheme` option defines the scheme of the new url.
|
||||
|
||||
### port
|
||||
### `port`
|
||||
|
||||
The `port` option defines the port of the new url.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue