We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent df85fef commit 1afe3adCopy full SHA for 1afe3ad
readthedocs/core/middleware.py
@@ -69,6 +69,8 @@ def process_request(self, request):
69
# Support ports during local dev
70
public_domain in host or public_domain in full_host
71
):
72
+ if Project.objects.filter(slug=subdomain).exists():
73
+ raise Http404(_('Project not found'))
74
request.subdomain = True
75
request.slug = subdomain
76
request.urlconf = SUBDOMAIN_URLCONF
0 commit comments