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 f98332c698
commit 8b0b123f42

View File

@ -13,9 +13,16 @@ server {
return 404;
}
# block .htaccess
location ~ /\.ht {
location /vendor {
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