Skip to content

Instantly share code, notes, and snippets.

@brendtumi
Created February 24, 2017 09:28
Show Gist options
  • Save brendtumi/a186237cd19de4d46baf5c61c0a5c3ef to your computer and use it in GitHub Desktop.
Save brendtumi/a186237cd19de4d46baf5c61c0a5c3ef to your computer and use it in GitHub Desktop.
Nginx reject non nodejs and f**ing bots
location ~ \.(asp|aspx|php|jsp|cgi|cgii|pl|py|exe|dll|msi)$ {
return 410;
}
location ~ /TWiki|WebHome|cgi-bin|portal|foswiki|spywall|setseed-hub|account/ig {
return 410;
}
if ($http_user_agent ~* (BDNC)) {
return 410;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment