fix jinja formatting; add options for hsts
This commit is contained in:
parent
b9800a6a4c
commit
aec36e8743
@ -1,5 +1,8 @@
|
|||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
# default header settings
|
# default header settings
|
||||||
|
{% if nginx_tls_enabled and nginx_hsts_enabled %}
|
||||||
|
add_header Strict-Transport-Security{% if nginx_hsts_options %} "{{ nginx_hsts_options | join("; ") }}{% endif %};
|
||||||
|
{% endif %}
|
||||||
add_header X-Frame-Options DENY;
|
add_header X-Frame-Options DENY;
|
||||||
add_header X-Content-Type-Options nosniff;
|
add_header X-Content-Type-Options nosniff;
|
||||||
add_header X-XSS-Protection "1; mode=block";
|
add_header X-XSS-Protection "1; mode=block";
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#jinja2: lstrip_blocks: True
|
||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
user {{ nginx_user }} {{ nginx_group }};
|
user {{ nginx_user }} {{ nginx_group }};
|
||||||
worker_processes {{ nginx_worker_processes }};
|
worker_processes {{ nginx_worker_processes }};
|
||||||
@ -16,12 +17,12 @@ http {
|
|||||||
'$status $body_bytes_sent "$http_referer" '
|
'$status $body_bytes_sent "$http_referer" '
|
||||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||||
|
|
||||||
{% if nginx_error_log.enabled %}
|
{% if nginx_error_log.enabled %}
|
||||||
error_log {{ nginx_error_log.file }} {{ nginx_error_log.level }};
|
error_log {{ nginx_error_log.file }} {{ nginx_error_log.level }};
|
||||||
{% else %}
|
{% else %}
|
||||||
error_log off;
|
error_log off;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if nginx_access_log.enabled %}
|
{% if nginx_access_log.enabled %}
|
||||||
access_log {{ nginx_access_log.file }} {{ nginx_access_log.format }};
|
access_log {{ nginx_access_log.file }} {{ nginx_access_log.format }};
|
||||||
{% else %}
|
{% else %}
|
||||||
access_log off;
|
access_log off;
|
||||||
|
Loading…
Reference in New Issue
Block a user