fix: corsAll from endpoint to middleware
This commit is contained in:
parent
09007a88bb
commit
146eec83a2
|
@ -2,7 +2,7 @@
|
|||
scheme = "https"
|
||||
permanent = true
|
||||
[http.middlewares.corsAll.headers]
|
||||
AccessControlAllowMethods= ["GET", "OPTIONS", "PUT"]
|
||||
AccessControlAllowOrigin = "*"
|
||||
AccessControlMaxAge = 100
|
||||
AddVaryHeader = true
|
||||
accessControlAllowMethods= ["GET", "OPTIONS", "PUT"]
|
||||
accessControlAllowOrigin = "origin-list-or-null"
|
||||
accessControlMaxAge = 100
|
||||
addVaryHeader = true
|
||||
|
|
|
@ -20,9 +20,12 @@
|
|||
[http.routers.{{r.name}}]
|
||||
rule = "{{ r.rule }}"
|
||||
{% if r.tls %}
|
||||
entryPoints = ["websecure"{% if "corsAll" in r and r.corsAll %}, "corsAll"{% endif %}]
|
||||
entryPoints = ["websecure"]
|
||||
{% else %}
|
||||
entryPoints = ["web"{% if "corsAll" in r and r.corsAll %}, "corsAll"{% endif %}]
|
||||
entryPoints = ["web"]
|
||||
{% endif %}
|
||||
{% if "corsAll" in r and r.corsAll %}
|
||||
middlewares = ["corsAll"]
|
||||
{% endif %}
|
||||
service = "{{r.name}}@file"
|
||||
{% if r.tls %}
|
||||
|
|
Loading…
Reference in New Issue