<div dir="ltr"><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">That is the power of the 'empty value = does nothing' logic. :o)<br></div><div class="gmail_extra"><div><div class="gmail_signature"><font size="1"><span style="color:rgb(102,102,102)">---<br></span><b><span style="color:rgb(102,102,102)">B. R.</span></b><span style="color:rgb(102,102,102)"></span></font></div></div>
<br><div class="gmail_quote">On Thu, Apr 2, 2015 at 3:33 PM, Cole Tierney <span dir="ltr"><<a href="mailto:cole.putnamhill@comcast.net" target="_blank">cole.putnamhill@comcast.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> On Apr 2, 2015, at 7:21 AM, itpp2012 <<a href="mailto:nginx-forum@nginx.us">nginx-forum@nginx.us</a>> wrote:<br>
><br>
> Cole Tierney Wrote:<br>
> -------------------------------------------------------<br>
>> Or is there a better method to block these?<br>
><br>
> Not really better but good enough :)<br>
><br>
> map $http_referer $waffableref {<br>
> default 0;<br>
> ~*\{.*\:\; 1;<br>
> }<br>
> map $http_user_agent $waffableua {<br>
> default 0;<br>
> ~*\{.*\:\; 1;<br>
> }<br>
> map $waffableref$waffableua $waffable {<br>
> default 0;<br>
> ~1 1;<br>
> }<br>
><br>
> # Block shellshock:<br>
> if ($waffable) { return 444; }<br>
><br>
> # Drop'm from logging:<br>
> map $waffable $loggable {<br>
> default 1;<br>
> ~1 0;<br>
> }<br>
><br>
> access_log /path/to/access.log combined if=$loggable;<br>
<br>
Thanks! I like the combined variables in the 3rd map.<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br></div></div>