diff --git a/ansible/roles/nginx/templates/nginx_site_config.j2 b/ansible/roles/nginx/templates/nginx_site_config.j2 index 304b68d0a2..c44844f1c2 100644 --- a/ansible/roles/nginx/templates/nginx_site_config.j2 +++ b/ansible/roles/nginx/templates/nginx_site_config.j2 @@ -107,7 +107,8 @@ server { access_log off; } - location ~* \.(txt|log)$ { + # Serve files from ckan but not from anywhere else + location ~* ^(?!/data/.*dataset/).*\.(txt|log)$ { allow 192.168.0.0/16; deny all; }