Auto quote headers values

pull/2/merge
Emilien Mantel 2017-02-09 12:03:14 +01:00
parent 2cd559b87a
commit 0e33d1b372
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ server {
{% block template_headers %} {% block template_headers %}
# --> Custom headers # --> Custom headers
{% for key, value in __headers.iteritems() %} {% for key, value in __headers.iteritems() %}
add_header {{ key }} {{ value | replace(' always', '') }}{% if nginx_version.stdout | version_compare('1.7.5', 'ge') and ' always' in value %} always{% endif %}; add_header {{ key }} "{{ value | replace(' always', '') }}"{% if nginx_version.stdout | version_compare('1.7.5', 'ge') and ' always' in value %} always{% endif %};
{% endfor %} {% endfor %}
# <-- Custom headers # <-- Custom headers
{% endblock %} {% endblock %}

View File

@ -42,7 +42,7 @@ nginx_templates_no_dir:
nginx_servers_default_headers: nginx_servers_default_headers:
'X-Frame-Options': 'DENY always' 'X-Frame-Options': 'DENY always'
'X-Content-Type-Options': 'nosniff always' 'X-Content-Type-Options': 'nosniff always'
'X-XSS-Protection': '"1; mode=block"' 'X-XSS-Protection': '1; mode=block'
nginx_upstream_php56: 'php56' nginx_upstream_php56: 'php56'
nginx_upstream_php70: 'php70' nginx_upstream_php70: 'php70'