I have a directory with my media files and I need no to display them on other sites. Server doesn't support .htaccess, because it uses nginx.
How can I enable hotlink protection for my files?? Thank you.
Easiest way would be to check for the Referer header in HTTP request. Basically if that header does not have URL from your site, then this could be hot linking.
This has following problems:
You could also set a cookie when user is browsing your site, and check for existence of that cookie when user is accessing the streaming content.