Re: Deny referrer using map directive

2015-05-04 Thread Dewangga
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello! On 5/4/2015 15:22, Francis Daly wrote: > On Mon, May 04, 2015 at 11:43:10AM +0700, Dewangga wrote: > > Hi there, > >> map $http_referer $badboys { hostnames; default 0; >> "~*hitleap.com" 1; } > > For info: > > This should work as-

Re: Deny referrer using map directive

2015-05-04 Thread Francis Daly
On Mon, May 04, 2015 at 11:43:10AM +0700, Dewangga wrote: Hi there, > map $http_referer $badboys { > hostnames; > default 0; > "~*hitleap.com" 1; > } For info: This should work as-is; but when using "hostnames", you probably don't need the regex match. Just ".hit

Deny referrer using map directive

2015-05-03 Thread Dewangga
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello! I have a map directive like this : map $http_referer $badboys { hostnames; default 0; "~*hitleap.com" 1; } and already defined on server block like this : server { .. skip .. if ($badboys) { return 40