How to disable valid_referers?

Maxim Dounin mdounin at
Wed Nov 10 16:45:32 MSK 2010


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

> 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?

location / {
    valid_referers ...

location = /some-specific-file {
    # no valid_referers directive here

See here for details:

> I guess I can't simply put "valid_referers none" here according to the
> documentation at (It says
> default: none, but I guess this will confuse people with the value "none").

Yes, that's translation artifact.  Changed to "default: no", that 
should be more clear.

Maxim Dounin

More information about the nginx mailing list