From 28923f755b7dd74893def04ad5f58fddb35095a6 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Wed, 8 Mar 2023 21:30:43 -0600 Subject: [PATCH] Fix prev commit --- judge/views/problem.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/judge/views/problem.py b/judge/views/problem.py index 89cf177..17ea56d 100644 --- a/judge/views/problem.py +++ b/judge/views/problem.py @@ -451,7 +451,9 @@ class ProblemPdfDescriptionView(ProblemMixin, SingleObjectMixin, View): raise Http404() response = HttpResponse() if request.META.get("SERVER_SOFTWARE", "").startswith("nginx/"): - response["X-Accel-Redirect"] = problem.pdf_description.path + response["X-Accel-Redirect"] = os.path.join( + settings.DMOJ_PROBLEM_DATA_ROOT, problem.pdf_description.path + ) else: with open(problem.pdf_description.path, "rb") as f: response.content = f.read()