New rule syntax
Co-authored-by: jbdoumenjou <jb.doumenjou@gmail.com>
This commit is contained in:
parent
7155f0d50d
commit
9ebe3c38b2
89 changed files with 1111 additions and 1357 deletions
|
@ -17,10 +17,10 @@ logLevel = "DEBUG"
|
|||
[Routers]
|
||||
[Routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Host:snitest.com"
|
||||
Rule = "Host(`snitest.com`)"
|
||||
[Routers.router2]
|
||||
Service = "service2"
|
||||
Rule = "Host:snitest.org"
|
||||
Rule = "Host(`snitest.org`)"
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
|
|
|
@ -16,10 +16,10 @@ logLevel = "DEBUG"
|
|||
[Routers]
|
||||
[Routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Host:snitest.com"
|
||||
Rule = "Host(`snitest.com`)"
|
||||
[Routers.router2]
|
||||
Service = "service2"
|
||||
Rule = "Host:snitest.org"
|
||||
Rule = "Host(`snitest.org`)"
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
|
|
|
@ -18,10 +18,10 @@ logLevel = "DEBUG"
|
|||
[Routers]
|
||||
[Routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Host:snitest.com"
|
||||
Rule = "Host(`snitest.com`)"
|
||||
[Routers.router2]
|
||||
Service = "service2"
|
||||
Rule = "Host:snitest.org"
|
||||
Rule = "Host(`snitest.org`)"
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
[Routers]
|
||||
[Routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Host:snitest.com"
|
||||
Rule = "Host(`snitest.com`)"
|
||||
[Routers.router2]
|
||||
Service = "service2"
|
||||
Rule = "Host:snitest.org"
|
||||
Rule = "Host(`snitest.org`)"
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
|
|
|
@ -17,10 +17,10 @@ logLevel = "DEBUG"
|
|||
[Routers]
|
||||
[Routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Host:snitest.com"
|
||||
Rule = "Host(`snitest.com`)"
|
||||
[Routers.router2]
|
||||
Service = "service1"
|
||||
Rule = "Host:www.snitest.com"
|
||||
Rule = "Host(`www.snitest.com`)"
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
|
|
|
@ -19,52 +19,52 @@ logLevel = "DEBUG"
|
|||
[Routers.router1]
|
||||
Service = "service1"
|
||||
Middlewares = ["redirect-https"]
|
||||
Rule = "Host: example.com"
|
||||
Rule = "Host(`example.com`)"
|
||||
|
||||
[Routers.router2]
|
||||
Service = "service1"
|
||||
Middlewares = ["redirect-https", "api-slash-strip"]
|
||||
Rule = "Host: example2.com"
|
||||
Rule = "Host(`example2.com`)"
|
||||
|
||||
[Routers.router3]
|
||||
Service = "service1"
|
||||
Middlewares = ["redirect-https", "foo-add-prefix"]
|
||||
Rule = "Host: test.com"
|
||||
Rule = "Host(`test.com`)"
|
||||
|
||||
[Routers.router4]
|
||||
Service = "service1"
|
||||
Middlewares = ["redirect-https", "foo-slash-add-prefix"]
|
||||
Rule = "Host: test2.com"
|
||||
Rule = "Host(`test2.com`)"
|
||||
|
||||
[Routers.router5]
|
||||
Service = "service1"
|
||||
Middlewares = ["redirect-https", "id-strip-regex-prefix"]
|
||||
Rule = "Host: foo.com"
|
||||
Rule = "Host(`foo.com`)"
|
||||
|
||||
[Routers.router6]
|
||||
Service = "service1"
|
||||
Middlewares = ["redirect-https", "id-slash-strip-regex-prefix"]
|
||||
Rule = "Host: foo2.com"
|
||||
Rule = "Host(`foo2.com`)"
|
||||
|
||||
[Routers.router7]
|
||||
Service = "service1"
|
||||
Middlewares = ["redirect-https", "api-regex-replace"]
|
||||
Rule = "Host: bar.com"
|
||||
Rule = "Host(`bar.com`)"
|
||||
|
||||
[Routers.router8]
|
||||
Service = "service1"
|
||||
Middlewares = ["redirect-https", "api-slash-regex-replace"]
|
||||
Rule = "Host: bar2.com"
|
||||
Rule = "Host(`bar2.com`)"
|
||||
|
||||
[Routers.router9]
|
||||
Service = "service1"
|
||||
Middlewares = ["redirect-https", "api-replace-path"]
|
||||
Rule = "Host: pow.com"
|
||||
Rule = "Host(`pow.com`)"
|
||||
|
||||
[Routers.router10]
|
||||
Service = "service1"
|
||||
Middlewares = ["redirect-https", "api-slash-replace-path"]
|
||||
Rule = "Host: pow2.com"
|
||||
Rule = "Host(`pow2.com`)"
|
||||
|
||||
[Middlewares]
|
||||
[Middlewares.api-strip.StripPrefix]
|
||||
|
|
|
@ -15,10 +15,10 @@ logLevel = "DEBUG"
|
|||
[Routers]
|
||||
[Routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Host:snitest.com"
|
||||
Rule = "Host(`snitest.com`)"
|
||||
[Routers.router2]
|
||||
Service = "service2"
|
||||
Rule = "Host:snitest.org"
|
||||
Rule = "Host(`snitest.org`)"
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
|
|
|
@ -16,10 +16,10 @@ logLevel = "DEBUG"
|
|||
[Routers]
|
||||
[Routers.router1]
|
||||
Service = "service1"
|
||||
rule = "HostRegexp: {subdomain:[a-z1-9-]+}.snitest.com"
|
||||
rule = "HostRegexp(`{subdomain:[a-z1-9-]+}.snitest.com`)"
|
||||
[Routers.router2]
|
||||
Service = "service1"
|
||||
rule = "HostRegexp: {subdomain:[a-z1-9-]+}.www.snitest.com"
|
||||
rule = "HostRegexp(`{subdomain:[a-z1-9-]+}.www.snitest.com`)"
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
|
|
|
@ -18,10 +18,10 @@ logLevel = "DEBUG"
|
|||
[Routers]
|
||||
[Routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Host:snitest.com"
|
||||
Rule = "Host(`snitest.com`)"
|
||||
[Routers.router2]
|
||||
Service = "service1"
|
||||
Rule = "Host:www.snitest.com"
|
||||
Rule = "Host(`www.snitest.com`)"
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
|
|
|
@ -19,7 +19,7 @@ logLevel = "DEBUG"
|
|||
[Routers]
|
||||
[Routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Host:snitest.com"
|
||||
Rule = "Host(`snitest.com`)"
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
|
|
|
@ -33,7 +33,7 @@ fblo6RBxUQ==
|
|||
[Routers]
|
||||
[Routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Path: /ping"
|
||||
Rule = "Path(`/ping`)"
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
|
|
|
@ -17,7 +17,7 @@ rootCAs = [ "fixtures/https/rootcas/local.crt"]
|
|||
[Routers]
|
||||
[Routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Path: /ping"
|
||||
Rule = "Path(`/ping`)"
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue