use list of dict for location.add_headers
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2021-05-20 14:47:09 +02:00
parent ae64f8822b
commit 39f7b3b47d
No known key found for this signature in database
GPG Key ID: 65362AE74AF98B61
2 changed files with 5 additions and 2 deletions

View File

@ -163,7 +163,10 @@ nginx_vhosts_default:
# - match: /
# root: /var/www/vhosts/default
# index: index.html
# add_headers: []
# add_headers:
# - name:
# value:
# always: True
# proxy_pass:
# proxy_http_version: "1.1"
# proxy_buffering: "off"

View File

@ -56,7 +56,7 @@ server {
{% if location.add_headers is defined and location.add_headers %}
include /etc/nginx/conf.d/header.conf;
{% for add in location.add_headers %}
add_header {{ add }};
add_header {{ add.name }} {{ add.value }}{{ " always" if add.always | default(True) | bool else "" }};
{% endfor %}
{% endif %}