traefik/integration/fixtures/https/https_redirect.toml
SALLEYRON Julien 9ebe3c38b2 New rule syntax
Co-authored-by: jbdoumenjou <jb.doumenjou@gmail.com>
2019-01-30 16:24:07 +01:00

103 lines
2.5 KiB
TOML

[log]
logLevel = "DEBUG"
[entryPoints]
[entryPoints.http]
address = ":8888"
[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.redirectScheme]
scheme = "https"
port = "8443"
[Services]
[Services.service1]
[Services.service1.LoadBalancer]
[[Services.service1.LoadBalancer.Servers]]
URL = "http://127.0.0.1:80"
Weight = 1