protected-resource

Django - Understanding X-Sendfile

笑着哭i 提交于 2019-11-28 18:15:16
I've been doing some research regarding file downloads with access control, using Django. My goal is to completely block access to a file, except when accessed by a specific user. I've read that when using Django, X-Sendfile is one of the methods of choice for achieving this (based on other SO questions, etc). My rudimentary understanding of using X-Sendfile with Django is: User requests URI to get a protected file Django app decides which file to return based on URL, and checks user permission, etc. Django app returns an HTTP Response with the 'X-Sendfile' header set to the server's file path

Django - Understanding X-Sendfile

岁酱吖の 提交于 2019-11-27 00:53:23
问题 I've been doing some research regarding file downloads with access control, using Django. My goal is to completely block access to a file, except when accessed by a specific user. I've read that when using Django, X-Sendfile is one of the methods of choice for achieving this (based on other SO questions, etc). My rudimentary understanding of using X-Sendfile with Django is: User requests URI to get a protected file Django app decides which file to return based on URL, and checks user