traefik/integration/fixtures/headers/cors.toml

43 lines
981 B
TOML
Raw Normal View History

[global]
2019-07-01 09:30:05 +00:00
checkNewVersion = false
sendAnonymousUsage = false
[log]
2019-07-01 09:30:05 +00:00
level = "DEBUG"
2019-04-02 08:40:04 +00:00
[entryPoints]
[entryPoints.web]
2019-04-02 08:40:04 +00:00
address = ":8000"
[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"]
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"