105 lines
2.6 KiB
TOML
105 lines
2.6 KiB
TOML
[log]
|
|
logLevel = "DEBUG"
|
|
|
|
|
|
[entryPoints]
|
|
[entryPoints.http]
|
|
address = ":8888"
|
|
|
|
[entryPoints.http.redirect]
|
|
entryPoint = "https"
|
|
|
|
[entryPoints.https]
|
|
address = ":8443"
|
|
[entryPoints.https.tls]
|
|
|
|
[api]
|
|
|
|
[providers]
|
|
[providers.file]
|
|
|
|
[Routers]
|
|
[Routers.router1]
|
|
Service = "service1"
|
|
Middlewares = ["redirect-https"]
|
|
Rule = "Host: example.com"
|
|
|
|
[Routers.router2]
|
|
Service = "service1"
|
|
Middlewares = ["redirect-https", "api-slash-strip"]
|
|
Rule = "Host: example2.com"
|
|
|
|
[Routers.router3]
|
|
Service = "service1"
|
|
Middlewares = ["redirect-https", "foo-add-prefix"]
|
|
Rule = "Host: test.com"
|
|
|
|
[Routers.router4]
|
|
Service = "service1"
|
|
Middlewares = ["redirect-https", "foo-slash-add-prefix"]
|
|
Rule = "Host: test2.com"
|
|
|
|
[Routers.router5]
|
|
Service = "service1"
|
|
Middlewares = ["redirect-https", "id-strip-regex-prefix"]
|
|
Rule = "Host: foo.com"
|
|
|
|
[Routers.router6]
|
|
Service = "service1"
|
|
Middlewares = ["redirect-https", "id-slash-strip-regex-prefix"]
|
|
Rule = "Host: foo2.com"
|
|
|
|
[Routers.router7]
|
|
Service = "service1"
|
|
Middlewares = ["redirect-https", "api-regex-replace"]
|
|
Rule = "Host: bar.com"
|
|
|
|
[Routers.router8]
|
|
Service = "service1"
|
|
Middlewares = ["redirect-https", "api-slash-regex-replace"]
|
|
Rule = "Host: bar2.com"
|
|
|
|
[Routers.router9]
|
|
Service = "service1"
|
|
Middlewares = ["redirect-https", "api-replace-path"]
|
|
Rule = "Host: pow.com"
|
|
|
|
[Routers.router10]
|
|
Service = "service1"
|
|
Middlewares = ["redirect-https", "api-slash-replace-path"]
|
|
Rule = "Host: pow2.com"
|
|
|
|
[Middlewares]
|
|
[Middlewares.api-strip.StripPrefix]
|
|
prefixes = ["/api"]
|
|
[Middlewares.api-slash-strip.StripPrefix]
|
|
prefixes = ["/api/"]
|
|
[Middlewares.foo-add-prefix.AddPrefix]
|
|
prefix = "/foo"
|
|
[Middlewares.foo-slash-add-prefix.AddPrefix]
|
|
prefix = "/foo/"
|
|
[Middlewares.id-strip-regex-prefix.StripPrefixRegex]
|
|
regex = ["/{id:[a-z]+}"]
|
|
[Middlewares.id-slash-strip-regex-prefix.StripPrefixRegex]
|
|
regex = ["/{id:[a-z]+}/"]
|
|
[Middlewares.api-regex-replace.ReplacePathRegex]
|
|
regex = "/api"
|
|
replacement = "/"
|
|
[Middlewares.api-slash-regex-replace.ReplacePathRegex]
|
|
regex = "/api/"
|
|
replacement = "/"
|
|
[Middlewares.api-replace-path.ReplacePath]
|
|
path = "/api"
|
|
[Middlewares.api-slash-replace-path.ReplacePath]
|
|
path = "/api/"
|
|
[Middlewares.redirect-https.redirect]
|
|
regex = "^(?:https?://)?([\\w\\._-]+)(?::\\d+)?(.*)$"
|
|
replacement = "https://${1}:8443${2}"
|
|
|
|
[Services]
|
|
[Services.service1]
|
|
[Services.service1.LoadBalancer]
|
|
|
|
[[Services.service1.LoadBalancer.Servers]]
|
|
URL = "http://127.0.0.1:80"
|
|
Weight = 1
|