Update the middleware documentation
This commit is contained in:
parent
6ab991ebf4
commit
2e20394af4
24 changed files with 488 additions and 70 deletions
|
@ -1,4 +1,4 @@
|
|||
# TODO - RedirectRegex
|
||||
# RedirectRegex
|
||||
|
||||
Redirecting the Client to a Different Location
|
||||
{: .subtitle }
|
||||
|
@ -28,6 +28,13 @@ spec:
|
|||
replacement: http://mydomain/$1
|
||||
```
|
||||
|
||||
```yaml tab="Rancher"
|
||||
# Redirect with domain replacement
|
||||
labels:
|
||||
- "traefik.http.middlewares.test-redirectregex.redirectregex.regex=^http://localhost/(.*)"
|
||||
- "traefik.http.middlewares.test-redirectregex.redirectregex.replacement=http://mydomain/$1"
|
||||
```
|
||||
|
||||
```toml tab="File"
|
||||
# Redirect with domain replacement
|
||||
[http.middlewares]
|
||||
|
@ -44,7 +51,7 @@ Set the `permanent` option to `true` to apply a permanent redirection.
|
|||
|
||||
### `regex`
|
||||
|
||||
The `Regex` option is the regular expression to match and capture elements form the request URL.
|
||||
The `Regex` option is the regular expression to match and capture elements from the request URL.
|
||||
|
||||
!!! warning
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue