Here is a sweet trick for dropping traffic with NGINX. When I mean drop, I mean, don&#x27;t send a response, literally terminate the connection.<p><pre><code>    location = &#x2F; {
        if ($http_user_agent ~* foo|bar) {
            # return non-standard (NGINX only) 444 code
            # closes the connection without sending a response header
            return 444;
        }
    }</code></pre>