Support RegularExpression for path matching
This commit is contained in:
parent
0e215f9b61
commit
6e61fe0de1
4 changed files with 30 additions and 1 deletions
|
@ -1300,6 +1300,12 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
Rule: "Host(`foo.com`) && Path(`/bar`) && Header(`my-header`,`bar`)",
|
||||
RuleSyntax: "v3",
|
||||
},
|
||||
"default-http-app-1-my-gateway-web-d23f7039bc8036fb918c": {
|
||||
EntryPoints: []string{"web"},
|
||||
Service: "default-http-app-1-my-gateway-web-d23f7039bc8036fb918c-wrr",
|
||||
Rule: "Host(`foo.com`) && PathRegexp(`^/buzz/[0-9]+$`)",
|
||||
RuleSyntax: "v3",
|
||||
},
|
||||
},
|
||||
Middlewares: map[string]*dynamic.Middleware{},
|
||||
Services: map[string]*dynamic.Service{
|
||||
|
@ -1323,6 +1329,16 @@ func TestLoadHTTPRoutes(t *testing.T) {
|
|||
},
|
||||
},
|
||||
},
|
||||
"default-http-app-1-my-gateway-web-d23f7039bc8036fb918c-wrr": {
|
||||
Weighted: &dynamic.WeightedRoundRobin{
|
||||
Services: []dynamic.WRRService{
|
||||
{
|
||||
Name: "default-whoami-80",
|
||||
Weight: func(i int) *int { return &i }(1),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"default-whoami-80": {
|
||||
LoadBalancer: &dynamic.ServersLoadBalancer{
|
||||
Servers: []dynamic.Server{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue