use list of dict for location.add_headers
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
ae64f8822b
commit
39f7b3b47d
|
@ -163,7 +163,10 @@ nginx_vhosts_default:
|
||||||
# - match: /
|
# - match: /
|
||||||
# root: /var/www/vhosts/default
|
# root: /var/www/vhosts/default
|
||||||
# index: index.html
|
# index: index.html
|
||||||
# add_headers: []
|
# add_headers:
|
||||||
|
# - name:
|
||||||
|
# value:
|
||||||
|
# always: True
|
||||||
# proxy_pass:
|
# proxy_pass:
|
||||||
# proxy_http_version: "1.1"
|
# proxy_http_version: "1.1"
|
||||||
# proxy_buffering: "off"
|
# proxy_buffering: "off"
|
||||||
|
|
|
@ -56,7 +56,7 @@ server {
|
||||||
{% if location.add_headers is defined and location.add_headers %}
|
{% if location.add_headers is defined and location.add_headers %}
|
||||||
include /etc/nginx/conf.d/header.conf;
|
include /etc/nginx/conf.d/header.conf;
|
||||||
{% for add in location.add_headers %}
|
{% for add in location.add_headers %}
|
||||||
add_header {{ add }};
|
add_header {{ add.name }} {{ add.value }}{{ " always" if add.always | default(True) | bool else "" }};
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue