From 216c53440883b81819971023362bbd58a84abbd7 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 12 Apr 2023 12:22:51 +0200 Subject: [PATCH] Proxito: allow to serve external version on development Since we are using `.devthedocs.org` and `.build.devthedocs.org`, the public domain is included in the external domain --this does not happen in production. So, in local development this makes the PR to not be served and detected as a "Weird variation of our domain". --- readthedocs/core/unresolver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs/core/unresolver.py b/readthedocs/core/unresolver.py index 1aa2986a34f..98bfe815e93 100644 --- a/readthedocs/core/unresolver.py +++ b/readthedocs/core/unresolver.py @@ -445,7 +445,7 @@ def unresolve_domain(self, domain): subdomain, *root_domain = domain.split(".", maxsplit=1) root_domain = root_domain[0] if root_domain else "" - if public_domain in domain: + if public_domain in domain and public_domain not in external_domain: # Serve from the PUBLIC_DOMAIN, ensuring it looks like `foo.PUBLIC_DOMAIN`. if public_domain == root_domain: project_slug = subdomain