A
A
Alexander Bondarenko2022-02-10 12:39:46
Django
Alexander Bondarenko, 2022-02-10 12:39:46

How to prohibit downloading private files from the server?

How to hide files from downloading? For example, I have a video that is available only to a group of users, but if someone sends a link to this video, then prohibit it from downloading and see how to implement it correctly? Please tell me which direction to look.

I looked at the ban through nginx, but as I understand it, it will become unavailable even for display on the site itself

location ^~ /files/score/ {
deny all;
return 404;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2022-02-10
@bond_1013

https://nginx.org/ru/docs/http/ngx_http_core_modul... + in django to this file response['X-Accel-Redirect']

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question