2019-04-09 15:24:05 +00:00
|
|
|
[global]
|
2019-07-01 09:30:05 +00:00
|
|
|
checkNewVersion = false
|
|
|
|
sendAnonymousUsage = false
|
2019-04-09 15:24:05 +00:00
|
|
|
|
|
|
|
[log]
|
2019-07-01 09:30:05 +00:00
|
|
|
level = "DEBUG"
|
2022-11-21 17:36:05 +00:00
|
|
|
noColor = true
|
2019-04-02 08:40:04 +00:00
|
|
|
|
2019-04-15 09:14:05 +00:00
|
|
|
[entryPoints]
|
|
|
|
[entryPoints.web]
|
2019-04-02 08:40:04 +00:00
|
|
|
address = ":8000"
|
|
|
|
|
2019-07-15 08:22:03 +00:00
|
|
|
[providers.file]
|
|
|
|
filename = "{{ .SelfFilename }}"
|
2019-07-01 09:30:05 +00:00
|
|
|
|
|
|
|
## dynamic configuration ##
|
2019-04-02 08:40:04 +00:00
|
|
|
|
|
|
|
[http.routers]
|
|
|
|
[http.routers.router1]
|
|
|
|
rule = "Host(`test.localhost`)"
|
2019-07-12 09:46:04 +00:00
|
|
|
middlewares = ["cors"]
|
|
|
|
service = "service1"
|
|
|
|
|
|
|
|
[http.routers.router2]
|
|
|
|
rule = "Host(`test2.localhost`)"
|
|
|
|
middlewares = ["nocors"]
|
2019-04-02 08:40:04 +00:00
|
|
|
service = "service1"
|
|
|
|
|
|
|
|
[http.middlewares]
|
2019-07-01 09:30:05 +00:00
|
|
|
[http.middlewares.cors.headers]
|
|
|
|
accessControlAllowMethods= ["GET", "OPTIONS", "PUT"]
|
2020-03-05 07:18:04 +00:00
|
|
|
accessControlAllowOriginList = ["https://foo.bar.org"]
|
2019-07-01 09:30:05 +00:00
|
|
|
accessControlMaxAge = 100
|
|
|
|
addVaryHeader = true
|
2019-04-02 08:40:04 +00:00
|
|
|
|
2019-07-12 09:46:04 +00:00
|
|
|
[http.middlewares.nocors.Headers]
|
|
|
|
[http.middlewares.nocors.Headers.CustomResponseHeaders]
|
|
|
|
X-Custom-Response-Header = "True"
|
|
|
|
|
2019-04-02 08:40:04 +00:00
|
|
|
[http.services]
|
2019-07-01 09:30:05 +00:00
|
|
|
[http.services.service1.loadBalancer]
|
|
|
|
[[http.services.service1.loadBalancer.servers]]
|
2019-07-12 09:46:04 +00:00
|
|
|
url = "http://127.0.0.1:9000"
|