Skip to content

Instantly share code, notes, and snippets.

@dazecoop
Last active October 5, 2023 09:21
Show Gist options
  • Save dazecoop/08e675b05832b06f50a47e8ea3379f88 to your computer and use it in GitHub Desktop.
Save dazecoop/08e675b05832b06f50a47e8ea3379f88 to your computer and use it in GitHub Desktop.
Prevent .git & .md file access with Ngnix
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