2 Commits
1.6.1 ... 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
Emilien Mantel
f5885c5c55 Cache fonts 2019-08-07 21:11:00 +02:00
2 changed files with 3 additions and 3 deletions

View File

@@ -106,7 +106,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 }}"; add_header {{ key }} "{{ value | regex_replace('\s+always$', '') }}"{% if value | regex_search('\s+always$') %} always{% endif %};
{% endfor %} {% endfor %}
# <-- Custom headers # <-- Custom headers
{% endblock %} {% endblock %}
@@ -140,7 +140,7 @@ server {
log_not_found off; log_not_found off;
} }
location ~* \.(txt|js|css|png|jpe?g|gif|ico|svg)$ { location ~* \.(txt|js|css|png|jpe?g|gif|ico|svg|(o|t)tf|woff2?|eot)$ {
expires 30d; expires 30d;
log_not_found off; log_not_found off;
} }

View File

@@ -46,6 +46,6 @@ 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 always'
nginx_acmesh_bin: "{{ nginx_acmesh_dir }}/acme.sh" nginx_acmesh_bin: "{{ nginx_acmesh_dir }}/acme.sh"