nginx hotlinking protection issue with wildcards !!

shahzaib shahzaib shahzaib.cb at
Thu May 8 22:14:35 UTC 2014


     I am using hotlinking protection for mp4 files but found that whenever
i use wildcard in hot-linking, it doesn't work properly and videos even
play on the domain where it doesn't suppose to be buffer.

My mp4 config :

location ~ \.(mp4)$ {
                root /var/www/html/tunefiles;
                expires 7d;
       valid_referers none blocked server_names mydomain *.mydomain *. * * * *;
              if ($invalid_referer) {
                    return   403;

The mp4 file is buffering on the following domain which doesn't suppose to
be in valid_referers variable.


Help will be highly appreciated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list