1 Commits
1.6.2 ... 1.6.3

Author SHA1 Message Date
Emilien Mantel
993310641a Fix "always" management in add_header directive 2019-08-20 10:35:51 +02:00
2 changed files with 2 additions and 2 deletions

View File

@@ -106,7 +106,7 @@ server {
{% block template_headers %}
# --> Custom headers
{% for key, value in __headers.iteritems() %}
add_header {{ key }} "{{ value }}";
add_header {{ key }} "{{ value | regex_replace('\s+always$', '') }}"{% if value | regex_search('\s+always$') %} always{% endif %};
{% endfor %}
# <-- Custom headers
{% endblock %}

View File

@@ -46,6 +46,6 @@ nginx_templates_no_dir:
nginx_servers_default_headers:
'X-Frame-Options': 'DENY always'
'X-Content-Type-Options': 'nosniff always'
'X-XSS-Protection': '1; mode=block'
'X-XSS-Protection': '1; mode=block always'
nginx_acmesh_bin: "{{ nginx_acmesh_dir }}/acme.sh"