Last active
October 5, 2023 09:21
-
-
Save dazecoop/08e675b05832b06f50a47e8ea3379f88 to your computer and use it in GitHub Desktop.
Prevent .git & .md file access with Ngnix
This file contains 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
server { | |
location ~ /\.git { | |
return 404; | |
} | |
location ~\.(git|md)$ { | |
return 404; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment