Skip to content

Instantly share code, notes, and snippets.

@GamePlayer-8
Created July 19, 2023 07:54
Show Gist options
  • Save GamePlayer-8/083a269510549b5f59e45411127a43ef to your computer and use it in GitHub Desktop.
Save GamePlayer-8/083a269510549b5f59e45411127a43ef to your computer and use it in GitHub Desktop.
nginx_blocklist.conf
set $returnhost <HOST, WHERE 403 ERROR IS SHOWN>;
# case sensitive matching
if ($http_user_agent ~ (Antivirx|Arian)) {
return 301 https://$returnhost;
}
# case insensitive matching
if ($http_user_agent ~* (malicious)) {
return 301 https://$returnhost;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment