traefik/docs/content/middlewares/redirectscheme.md

49 lines
903 B
Markdown
Raw Normal View History

# TODO - RedirectScheme
Redirecting the Client to a Different Scheme/Port
{: .subtitle }
`TODO: add schema`
RegexRedirect redirect request from a scheme to another.
## Configuration Examples
2019-04-03 12:32:04 +00:00
```yaml tab="Docker"
# Redirect to https
labels:
- "traefik.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
```
```toml tab="File"
# Redirect to https
[http.middlewares]
[http.middlewares.test-redirectscheme.redirectscheme]
scheme = "https"
```
## Configuration Options
2019-04-03 12:32:04 +00:00
### `permanent`
Set the `permanent` option to `true` to apply a permanent redirection.
2019-04-03 12:32:04 +00:00
### `scheme`
The `scheme` option defines the scheme of the new url.
2019-04-03 12:32:04 +00:00
### `port`
The `port` option defines the port of the new url.