fix: corsAll if not defined

This commit is contained in:
Geno 2020-11-27 12:58:56 +01:00
parent 4c9e3a6ab2
commit 09007a88bb
1 changed files with 2 additions and 2 deletions

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"{% if r.corsAll %}, "corsAll"{% endif %}] entryPoints = ["websecure"{% if "corsAll" in r and r.corsAll %}, "corsAll"{% endif %}]
{% else %} {% else %}
entryPoints = ["web"{% if r.corsAll %}, "corsAll"{% endif %}] entryPoints = ["web"{% if "corsAll" in r and r.corsAll %}, "corsAll"{% endif %}]
{% endif %} {% endif %}
service = "{{r.name}}@file" service = "{{r.name}}@file"
{% if r.tls %} {% if r.tls %}