Welcome! Log In Create A New Profile

Advanced

Deny referrer using map directive

May 04, 2015 12:44AM
-----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 406;
}

... skip ..

}

but, if I tried to access them using given referral, still got HTTP 200.
$ curl -I https://domain.name -L -e hitleap.com | grep 200
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:--
- --:--:-- 0
HTTP/1.1 200 OK


Is there any additional configuration needed?
Any help will be appreciated :)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)

iQEcBAEBAgAGBQJVRvjdAAoJEF1+odKB6YIxqr0IALSocMLPk584ZuGO82IQ8gw6
//GBuFr1nF15ov9fk3wgcae4S9p4InVWGyQ4y6tvgmrHaaiiZQUg9I99E+P9t7x/
cgdobsy7pg0UZGRsEZSVY5EZhELLyucCZ9p+p0gD/m78JeSHvRFSgPze3jfK5xtv
DsGxu0j8Lk/W7lVqO48mVQTsbsv8mIxGPq5YrReNjXNaRW6XrsW78r8KQH4doTp4
+h3Q0ZfHcl3U28+0I+lmWEAga7/2m9cpRMqoqforvvdOHw/CQStCnPMhLa6ASS8s
kXFqa8xkwjfdoLigGBWjd8hQnHjjBOVdhBUMTTu3i+tAU29H6lJgsipIXe4DWgo=
=pYP1
-----END PGP SIGNATURE-----

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Deny referrer using map directive

dewanggaba May 04, 2015 12:44AM

Re: Deny referrer using map directive

Francis Daly May 04, 2015 04:24AM

Re: Deny referrer using map directive

dewanggaba May 04, 2015 04:30AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 173
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready