Protecting the files...

19 views
Skip to first unread message

Suraj Thapa FC

unread,
Oct 7, 2019, 6:42:36 AM10/7/19
to django...@googlegroups.com
How do I protect the media and static files... From unauthorised access.

Kasper Laudrup

unread,
Oct 7, 2019, 7:04:42 AM10/7/19
to django...@googlegroups.com
Hi Suraj,

On 07/10/2019 12.41, Suraj Thapa FC wrote:
> How do I protect the media and static files... From unauthorised access.
>

If you use Nginx, have a look here:

https://wellfire.co/learn/nginx-django-x-accel-redirects/

Something similar can most likely be done with other web servers (eg.
Apache).

Kind regards,

Kasper Laudrup

> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users...@googlegroups.com
> <mailto:django-users...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPjsHcHCCzXbkYX663xz-%3DMX7pS%3D_3uQOP7xa-L0hNTLjHdxuw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAPjsHcHCCzXbkYX663xz-%3DMX7pS%3D_3uQOP7xa-L0hNTLjHdxuw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Pradeep Sukhwani

unread,
Oct 7, 2019, 7:21:12 AM10/7/19
to Django users
Hi Suraj,

Here there is a detailed example of restricting access to media and static files based on per user.

--
Thanks
Pradeep Sukhwani
Reply all
Reply to author
Forward
0 new messages