docker-compose labels require $'s to be escaped
This commit is contained in:
parent
16bd0b9ca8
commit
99797502eb
1 changed files with 7 additions and 7 deletions
|
@ -13,7 +13,7 @@ RegexRedirect redirect a request from an url to another with regex matching and
|
|||
# Redirect with domain replacement
|
||||
labels:
|
||||
- "traefik.http.middlewares.test-redirectregex.redirectregex.regex=^http://localhost/(.*)"
|
||||
- "traefik.http.middlewares.test-redirectregex.redirectregex.replacement=http://mydomain/$1"
|
||||
- "traefik.http.middlewares.test-redirectregex.redirectregex.replacement=http://mydomain/$${1}"
|
||||
```
|
||||
|
||||
```yaml tab="Kubernetes"
|
||||
|
@ -25,13 +25,13 @@ metadata:
|
|||
spec:
|
||||
redirectRegex:
|
||||
regex: ^http://localhost/(.*)
|
||||
replacement: http://mydomain/$1
|
||||
replacement: http://mydomain/${1}
|
||||
```
|
||||
|
||||
```json tab="Marathon"
|
||||
"labels": {
|
||||
"traefik.http.middlewares.test-redirectregex.redirectregex.regex": "^http://localhost/(.*)",
|
||||
"traefik.http.middlewares.test-redirectregex.redirectregex.replacement": "http://mydomain/$1"
|
||||
"traefik.http.middlewares.test-redirectregex.redirectregex.replacement": "http://mydomain/${1}"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -39,7 +39,7 @@ spec:
|
|||
# Redirect with domain replacement
|
||||
labels:
|
||||
- "traefik.http.middlewares.test-redirectregex.redirectregex.regex=^http://localhost/(.*)"
|
||||
- "traefik.http.middlewares.test-redirectregex.redirectregex.replacement=http://mydomain/$1"
|
||||
- "traefik.http.middlewares.test-redirectregex.redirectregex.replacement=http://mydomain/${1}"
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
|
@ -47,7 +47,7 @@ labels:
|
|||
[http.middlewares]
|
||||
[http.middlewares.test-redirectregex.redirectRegex]
|
||||
regex = "^http://localhost/(.*)"
|
||||
replacement = "http://mydomain/$1"
|
||||
replacement = "http://mydomain/${1}"
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
|
@ -57,7 +57,7 @@ http:
|
|||
test-redirectregex:
|
||||
redirectRegex:
|
||||
regex: "^http://localhost/(.*)"
|
||||
replacement: "http://mydomain/$1"
|
||||
replacement: "http://mydomain/${1}"
|
||||
```
|
||||
|
||||
## Configuration Options
|
||||
|
@ -80,5 +80,5 @@ The `regex` option is the regular expression to match and capture elements from
|
|||
|
||||
### `replacement`
|
||||
|
||||
The `replacement` option defines how to modify the URl to have the new target URL.
|
||||
The `replacement` option defines how to modify the URL to have the new target URL.
|
||||
|
Loading…
Reference in a new issue