Fix HostRegexp examples
This commit is contained in:
parent
491de0cf64
commit
40deefa868
1 changed files with 8 additions and 8 deletions
|
@ -292,7 +292,7 @@ A value of `0` for the priority is ignored: `priority = 0` means that the defaul
|
|||
http:
|
||||
routers:
|
||||
Router-1:
|
||||
rule: "HostRegexp(`.*\.traefik\.com`)"
|
||||
rule: "HostRegexp(`{subdomain:[a-z]+}.traefik.com`)"
|
||||
# ...
|
||||
Router-2:
|
||||
rule: "Host(`foobar.traefik.com`)"
|
||||
|
@ -303,7 +303,7 @@ A value of `0` for the priority is ignored: `priority = 0` means that the defaul
|
|||
## Dynamic configuration
|
||||
[http.routers]
|
||||
[http.routers.Router-1]
|
||||
rule = "HostRegexp(`.*\.traefik\.com`)"
|
||||
rule = "HostRegexp(`{subdomain:[a-z]+}.traefik.com`)"
|
||||
# ...
|
||||
[http.routers.Router-2]
|
||||
rule = "Host(`foobar.traefik.com`)"
|
||||
|
@ -312,10 +312,10 @@ A value of `0` for the priority is ignored: `priority = 0` means that the defaul
|
|||
|
||||
In this case, all requests with host `foobar.traefik.com` will be routed through `Router-1` instead of `Router-2`.
|
||||
|
||||
| Name | Rule | Priority |
|
||||
|----------|--------------------------------------|----------|
|
||||
| Router-1 | ```HostRegexp(`.*\.traefik\.com`)``` | 30 |
|
||||
| Router-2 | ```Host(`foobar.traefik.com`)``` | 26 |
|
||||
| Name | Rule | Priority |
|
||||
|----------|----------------------------------------------------|----------|
|
||||
| Router-1 | ```HostRegexp(`{subdomain:[a-z]+}.traefik.com`)``` | 30 |
|
||||
| Router-2 | ```Host(`foobar.traefik.com`)``` | 26 |
|
||||
|
||||
The previous table shows that `Router-1` has a higher priority than `Router-2`.
|
||||
|
||||
|
@ -328,7 +328,7 @@ A value of `0` for the priority is ignored: `priority = 0` means that the defaul
|
|||
http:
|
||||
routers:
|
||||
Router-1:
|
||||
rule: "HostRegexp(`.*\.traefik\.com`)"
|
||||
rule: "HostRegexp(`{subdomain:[a-z]+}.traefik.com`)"
|
||||
entryPoints:
|
||||
- "web"
|
||||
service: service-1
|
||||
|
@ -345,7 +345,7 @@ A value of `0` for the priority is ignored: `priority = 0` means that the defaul
|
|||
## Dynamic configuration
|
||||
[http.routers]
|
||||
[http.routers.Router-1]
|
||||
rule = "HostRegexp(`.*\.traefik\.com`)"
|
||||
rule = "HostRegexp(`{subdomain:[a-z]+}.traefik.com`)"
|
||||
entryPoints = ["web"]
|
||||
service = "service-1"
|
||||
priority = 1
|
||||
|
|
Loading…
Reference in a new issue