deny vendor, composer.json, changelog.md etc. in nginx config sample

This commit is contained in:
slawkens 2024-04-06 19:51:34 +02:00
parent 9106f1e4ce
commit f837b3133d

View File

@ -13,9 +13,16 @@ server {
return 404; return 404;
} }
# block .htaccess location /vendor {
location ~ /\.ht {
deny all; deny all;
return 404;
}
# block .htaccess, CHANGELOG.md, composer.json etc.
# this is to prevent finding software versions
location ~\.(ht|md|json|dist)$ {
deny all;
return 404;
} }
# block git files and folders # block git files and folders