code: def media_nginx_accel(request, path):
      
      response = HttpResponse(status=200)
      response['Content-Type'] = ''
      response['X-Accel-Redirect'] = '/protected' + request.path
      return response
docs: location /protected/ {
          internal;
          root <complete path to project root dir>;
      }