Add nginx rule

This commit is contained in:
rundef 2016-02-18 07:51:58 -05:00
parent 2245c5c0e7
commit e10dbd931a
2 changed files with 2 additions and 5 deletions

View file

@ -13,10 +13,7 @@
RewriteBase /
# Deny access to framework directories
RewriteRule ^(app|bootstrap|config|database|resources|storage|tests|vendor)/ - [R=404,L,NC]
# Deny access to node_modules directories
RewriteRule ^node_modules/ - [R=404,L,NC]
RewriteRule ^(app|bootstrap|config|database|resources|storage|tests|vendor|node_modules)/ - [R=404,L,NC]
# And dot files/folders (for example .env)
RedirectMatch 404 /\..*$

View file

@ -10,7 +10,7 @@ server {
}
# Deny access to framework directories
location ~ /(app|bootstrap|config|database|resources|storage|tests|vendor)/ {
location ~ /(app|bootstrap|config|database|resources|storage|tests|vendor|node_modules)/ {
deny all;
}