Answer the question
In order to leave comments, you need to log in
How to properly organize location with internal for mp4 output?
Greetings!
I just can't figure out how to organize the following:
Video is stored on the server in the following ways:
/4/4/3/videoname.mp4
/4/44/3342/videoname.mp4
/24/234/3123/videoname.mp4
etc. .
The server only has nginx.
On the other / other servers, the video generates links of the following type
storage.com/24/234/3123/videoname.mp4?hash=45a944d
...
location / {
proxy_pass http://127.0.0.1:port; //тут висит сервис на go который по hash должен проверять доступ и редиректить на mp4 с заголовком X-Accel-Redirect
}
location ~ \.mp4$ {
internal;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question