This commit is contained in:
Geno 2020-11-27 12:53:00 +01:00
parent 0cd5eacb33
commit 461211ad29
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
[http.middlewares.httpsRedirect.redirectScheme] [http.middlewares.httpsRedirect.redirectScheme]
scheme = "https" scheme = "https"
permanent = true permanent = true
[http.middlewares.corsAll.headers]
AccessControlAllowMethods= ["GET", "OPTIONS", "PUT"]
AccessControlAllowOrigin = "*"
AccessControlMaxAge = 100
AddVaryHeader = true

View File

@ -20,9 +20,9 @@
[http.routers.{{r.name}}] [http.routers.{{r.name}}]
rule = "{{ r.rule }}" rule = "{{ r.rule }}"
{% if r.tls %} {% if r.tls %}
entryPoints = ["websecure"] entryPoints = ["websecure"{% if r.corsAll %}, "corsAll"{% endif %}]
{% else %} {% else %}
entryPoints = ["web"] entryPoints = ["web"{% if r.corsAll %}, "corsAll"{% endif %}]
{% endif %} {% endif %}
service = "{{r.name}}@file" service = "{{r.name}}@file"
{% if r.tls %} {% if r.tls %}