Block empty user agent nginx

From DevOps Notebook

Add into server block

if ($http_user_agent = "") { return 403; }