This commit is contained in:
cuom1999 2022-12-23 02:21:14 -06:00
parent a5f6d32977
commit 5b78ea65e4

View file

@ -431,9 +431,9 @@ class ProblemPdfDescriptionView(ProblemMixin, SingleObjectMixin, View):
if not problem.pdf_description:
raise Http404()
response = HttpResponse()
#if request.META.get("SERVER_SOFTWARE", "").startswith("nginx/"):
# if request.META.get("SERVER_SOFTWARE", "").startswith("nginx/"):
# response["X-Accel-Redirect"] = problem.pdf_description.path
#else:
# else:
with open(problem.pdf_description.path, "rb") as f:
response.content = f.read()