Fix nginx pdf
This commit is contained in:
parent
66b9240fd4
commit
1c47d87b61
1 changed files with 1 additions and 1 deletions
|
@ -409,7 +409,7 @@ class ProblemPdfDescriptionView(ProblemMixin, SingleObjectMixin, View):
|
|||
raise Http404()
|
||||
response = HttpResponse()
|
||||
if request.META.get("SERVER_SOFTWARE", "").startswith("nginx/"):
|
||||
response["X-Accel-Redirect"] = problem.pdf_description
|
||||
response["X-Accel-Redirect"] = problem.pdf_description.path
|
||||
else:
|
||||
with open(problem.pdf_description.path, "rb") as f:
|
||||
response.content = f.read()
|
||||
|
|
Loading…
Reference in a new issue