Enable CORS configuration
This commit is contained in:
parent
883f90dded
commit
d2b38e6ac4
13 changed files with 888 additions and 89 deletions
21
integration/fixtures/headers/basic.toml
Normal file
21
integration/fixtures/headers/basic.toml
Normal file
|
@ -0,0 +1,21 @@
|
|||
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
rule = "Host(`test.localhost`)"
|
||||
service = "service1"
|
||||
|
||||
[http.services]
|
||||
[http.services.service1.loadbalancer]
|
||||
[[http.services.service1.loadbalancer.servers]]
|
||||
url = "http://172.17.0.2:80"
|
||||
weight = 1
|
28
integration/fixtures/headers/cors.toml
Normal file
28
integration/fixtures/headers/cors.toml
Normal file
|
@ -0,0 +1,28 @@
|
|||
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
rule = "Host(`test.localhost`)"
|
||||
service = "service1"
|
||||
|
||||
[http.middlewares]
|
||||
[http.middlewares.cors.Headers]
|
||||
AccessControlAllowMethods= ["GET", "OPTIONS", "PUT"]
|
||||
AccessControlAllowOrigin = "origin-list-or-null"
|
||||
AccessControlMaxAge = 100
|
||||
AddVaryHeader = true
|
||||
|
||||
[http.services]
|
||||
[http.services.service1.loadbalancer]
|
||||
[[http.services.service1.loadbalancer.servers]]
|
||||
url = "http://172.17.0.2:80"
|
||||
weight = 1
|
Loading…
Add table
Add a link
Reference in a new issue