Nginx Hotlink Protection

To block hotlink protection or bandwidth stealing, you can add following to server configuration of your web site.

If you need to allow hotlink from a specific domain, you can edit the valid_referers line and add the url.

If you only want to limit access to images and videos, you can put above code in a location block like

Example

https://gist.github.com/serverok/e7e8e275a7ec3b69e19252edfed483e2

See Nginx

Leave a Reply

Your email address will not be published. Required fields are marked *