by nodesocket · 10y ago · 0 comments
location = / {
if ($http_user_agent ~* foo|bar) {
# return non-standard (NGINX only) 444 code
# closes the connection without sending a response header
return 444;
}
}This will get you nothing in a typical DDoS scenario, but thanks for sharing as it may come handy for other situations.