Created
May 15, 2019 13:00
-
-
Save nimolix/d75c12b53c46dd0ec695a65905eadfa3 to your computer and use it in GitHub Desktop.
Disallow access to .bzr, .git, .hg, .svn, .cvs directories: return 404 as not to disclose information.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ^~ /.(bzr|git|hg|svn|cvs) { | |
return 404; | |
} | |
location ^~ /node_modules { | |
return 404; | |
} | |
location ^~ /Gruntfile.js { | |
return 404; | |
} | |
location ^~ /README.md { | |
return 404; | |
} | |
location ^~ /package.json { | |
return 404; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment