Welcome! Log In Create A New Profile

Advanced

Re: How to disable valid_referers?

November 10, 2010 08:38AM
On Wed, Nov 10, 2010 at 09:27:58PM +0800, Horus Lee wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi guys,
>
> Say if I have many files under / (document root), all of them need
> hotlink protection, except one.
>
> I set valid_referers for location / as default, how could I skip the
> proection for the specific file?
>
> I guess I can't simply put "valid_referers none" here according to the
> documentation at http://wiki.nginx.org/HttpRefererModule (It says
> default: none, but I guess this will confuse people with the value "none").

valid_referers ...;

root ...;

location / {
if ($invalid_referer) {
return 403;
}
}

location = /some.specfic.file {
}

location = /other.specfic.file {
}


--
Igor Sysoev
http://sysoev.ru/en/

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

How to disable valid_referers?

Horus Lee November 10, 2010 08:32AM

Re: How to disable valid_referers?

Igor Sysoev November 10, 2010 08:38AM

Re: How to disable valid_referers?

Horus Lee November 10, 2010 08:40AM

Re: How to disable valid_referers?

Igor Sysoev November 10, 2010 08:42AM

Re: Re: Re: How to disable valid_referers?

Horus Lee November 10, 2010 08:46AM

Re: How to disable valid_referers?

Maxim Dounin November 10, 2010 08:48AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 86
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready