Nginx Block User-Agent "-"
<p>I'm getting some kind of access that is causing problems on my server:</p>

<pre><code>172.68.28.210 - - [03/Jul/2016:13:41:06 -0300] " "GET / HTTP/1.1" 502 166 "-" "-"
</code></pre>

<p>I would like to block even the $HTTP_USER_AGENT, made this attempt did not work.</p>

<pre><code>if ($http_user_agent = "-") {
        return 403;
    }
</code></pre>

<p>Someone would know what's wrong?</p>