Skip to content

Commit

Permalink
deny vendor, composer.json, changelog.md etc. in nginx config sample
Browse files Browse the repository at this point in the history
  • Loading branch information
slawkens committed Apr 6, 2024
1 parent 9106f1e commit f837b31
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions nginx-sample.conf
Expand Up @@ -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
Expand Down

0 comments on commit f837b31

Please sign in to comment.