from django.http import HttpResponse, HttpResponseRedirect
def serve_file(url):
"""Serves an URL either though Nginx's X-accel, or by redirection."""
from django.http import HttpResponse, HttpResponseRedirect
def serve_file(url):
"""Serves an URL either though Nginx's X-accel, or by redirection."""
response = HttpResponse()
response['Content-Type'] = ""
response['X-Accel-Redirect'] = url
response = HttpResponse()
response['Content-Type'] = ""
response['X-Accel-Redirect'] = url