simpler x-accel-redirect support
This commit is contained in:
parent
7acf61684e
commit
495e04c1b5
1 changed files with 0 additions and 2 deletions
|
@ -15,8 +15,6 @@ def HttpFileResponse(path, content_type=None, filename=None):
|
|||
if settings.XACCELREDIRECT:
|
||||
response = HttpResponse()
|
||||
response['Content-Length'] = os.stat(path).st_size
|
||||
if not isinstance(settings.XACCELREDIRECT, bool):
|
||||
path = path.replace(*settings.XACCELREDIRECT)
|
||||
if path.startswith(settings.STATIC_ROOT):
|
||||
path = settings.STATIC_URL + path[len(settings.STATIC_ROOT)+1:]
|
||||
if path.startswith(settings.MEDIA_ROOT):
|
||||
|
|
Loading…
Reference in a new issue