S
S
Shyngys Sailaubai2019-03-12 16:22:28
Nginx
Shyngys Sailaubai, 2019-03-12 16:22:28

How to set permissions on a static file using nginx?

Good day to all.
Who had the task of when media files that are on the server should be available only to certain users.
I have looked at three options so far:
1. X-accel-redirect
2. Send through the application itself as a blob (php, python, nodejs, etc.)
3. Come up with a complex path to the file (sometimes it won’t work)
Who faced and who decided how .
What I want to know: I wanted to write a module for nginx to solve this problem. And how much is the need for such a module

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2019-03-12
@ky0

This is not the task of the web server, but of the backend - to resolve the logic. So option number two, IMHO.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question