diff --git a/judge/views/problem.py b/judge/views/problem.py index 185270f..9e8038c 100644 --- a/judge/views/problem.py +++ b/judge/views/problem.py @@ -408,10 +408,8 @@ class ProblemPdfDescriptionView(ProblemMixin, SingleObjectMixin, View): if not problem.pdf_description: raise Http404() response = HttpResponse() - if hasattr(settings, "DMOJ_PDF_PROBLEM_INTERNAL") and request.META.get( - "SERVER_SOFTWARE", "" - ).startswith("nginx/"): - response["X-Accel-Redirect"] = problem.pdf_description.path + if request.META.get("SERVER_SOFTWARE", "").startswith("nginx/"): + response["X-Accel-Redirect"] = problem.pdf_description else: with open(problem.pdf_description.path, "rb") as f: response.content = f.read()