diff --git a/changelogs/fragments/1183-nginx-fix-against-path-traversal.yml b/changelogs/fragments/1183-nginx-fix-against-path-traversal.yml new file mode 100644 index 000000000..63d658bec --- /dev/null +++ b/changelogs/fragments/1183-nginx-fix-against-path-traversal.yml @@ -0,0 +1,2 @@ +minor_changes: + - Add slash at the end of the location directives, to prevent path traversal attacks. diff --git a/roles/zabbix_web/templates/nginx_vhost.conf.j2 b/roles/zabbix_web/templates/nginx_vhost.conf.j2 index 7854b83ce..dc8cc1635 100644 --- a/roles/zabbix_web/templates/nginx_vhost.conf.j2 +++ b/roles/zabbix_web/templates/nginx_vhost.conf.j2 @@ -20,7 +20,7 @@ server { try_files $uri $uri/ =404; } - location /assets { + location /assets/ { access_log off; expires 10d; } @@ -85,7 +85,7 @@ server { try_files $uri $uri/ =404; } - location /assets { + location /assets/ { access_log off; expires 10d; }