Y
Y
YakutD2017-12-25 15:34:50
Nginx
YakutD, 2017-12-25 15:34:50

How to protect a file from being opened via a direct link?

Hello, this question has already been asked many times, but I could not find a solution.
In general, I have a video directory, and video files are stored in it accordingly. I display the videos themselves to users in an iframe, where src = 'video/filename.mp4' . Only authorized users can see the video. However, if you follow the direct link site.ru/video/filename.mp4, the file will open for hello.
I tried using .htaccess , I wrote the following:
Deny from all
Then the error in the iframe is that access is denied.
I'm running the site on a local server.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Boris Korobkov, 2017-12-25
@BorisKorobkov

nginx.org/ru/docs/http/ngx_http_secure_link_module.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question