Difference between revisions of "Block empty user agent nginx"

From DevOps Notebook
(Created page with "Add into server block <pre> if ($http_user_agent = "") { return 403; } </pre>")
 
 
Line 1: Line 1:
 
Add into server block
 
Add into server block
<pre>
+
<syntaxhighlight lang="nginx">
 
if ($http_user_agent = "") { return 403; }
 
if ($http_user_agent = "") { return 403; }
</pre>
+
</syntaxhighlight>

Latest revision as of 18:55, 8 October 2020

Add into server block

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