Deny certain words

Maxim Dounin mdounin at mdounin.ru
Tue Sep 2 13:09:55 UTC 2014


Hello!

On Tue, Sep 02, 2014 at 12:17:12PM +0100, Steve Wilson wrote:

> Torrent clients have their own user agent normally, I had a need a while
> back to block some which we used the magic 444 to kill it.
> 
> if ($http_user_agent ~* (uTorrent|Transmission) ) {
>  return 444;
>  break;
> }

Just a note: you don't need "break" here.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx mailing list