2019-02-26 13:50:07 +00:00
|
|
|
# TODO - RedirectScheme
|
|
|
|
|
|
|
|
Redirecting the Client to a Different Scheme/Port
|
|
|
|
{: .subtitle }
|
|
|
|
|
|
|
|
`TODO: add schema`
|
|
|
|
|
|
|
|
RegexRedirect redirect request from a scheme to another.
|
|
|
|
|
|
|
|
## Configuration Examples
|
|
|
|
|
|
|
|
??? example "File -- Redirect to https"
|
|
|
|
|
|
|
|
```toml
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.middlewares]
|
|
|
|
[http.middlewares.test-redirectscheme.redirectscheme]
|
2019-02-26 13:50:07 +00:00
|
|
|
scheme = "https"
|
|
|
|
```
|
|
|
|
|
|
|
|
??? example "Docker -- Redirect to https"
|
|
|
|
|
|
|
|
```yml
|
|
|
|
a-container:
|
|
|
|
image: a-container-image
|
|
|
|
labels:
|
2019-03-14 08:30:04 +00:00
|
|
|
- "traefik.http.middlewares.test-redirectscheme.redirectscheme.scheme=https"
|
2019-02-26 13:50:07 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Configuration Options
|
|
|
|
|
|
|
|
### permanent
|
|
|
|
|
|
|
|
Set the `permanent` option to `true` to apply a permanent redirection.
|
|
|
|
|
|
|
|
### scheme
|
|
|
|
|
|
|
|
The `scheme` option defines the scheme of the new url.
|
|
|
|
|
|
|
|
### port
|
|
|
|
|
|
|
|
The `port` option defines the port of the new url.
|