Django - Understanding X-Sendfile
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