From 1e7468bbe52713868e835d9dfafecee1e154e9a0 Mon Sep 17 00:00:00 2001 From: Prakhar Pratyush Date: Mon, 2 Sep 2024 17:25:45 +0530 Subject: [PATCH] dev_settings: Fix landing page not accessible on root domain. The ROOT_DOMAIN_LANDING_PAGE boolean setting is set based on whether the root domain is a landing page or can host a realm. We set it to False by default as we don't expect it to be used by someone outside zulip.com (mentioned in 3173db37f7904221). But the development environment uses the root domain 'zulipdev.com' as landing page and the default realm is hosted at the subdomain 'zulip.zulipdev.com'. So, this commit overrides the default value in 'dev_settings.py'. Earlier, the zulip.com equivalent landing pages, including the help center pages were not accessible in the dev environment. This commit fixes those bugs. Fixes #30750. --- zproject/dev_settings.py | 4 ++++ zproject/test_extra_settings.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/zproject/dev_settings.py b/zproject/dev_settings.py index e2b8d3878b..c7def46bdb 100644 --- a/zproject/dev_settings.py +++ b/zproject/dev_settings.py @@ -217,3 +217,7 @@ ALLOW_GROUP_VALUED_SETTINGS = True # This value needs to be lower in development than usual to allow # for quicker testing of the feature. RESOLVE_TOPIC_UNDO_GRACE_PERIOD_SECONDS = 5 + +# In a dev environment, 'zulipdev.com:9991' is used to access the landing page. +# See: https://zulip.readthedocs.io/en/latest/subsystems/realms.html#working-with-subdomains-in-development-environment +ROOT_DOMAIN_LANDING_PAGE = True diff --git a/zproject/test_extra_settings.py b/zproject/test_extra_settings.py index 37f604c86c..71a5705ed4 100644 --- a/zproject/test_extra_settings.py +++ b/zproject/test_extra_settings.py @@ -289,3 +289,5 @@ ALLOW_GROUP_VALUED_SETTINGS = True RESOLVE_TOPIC_UNDO_GRACE_PERIOD_SECONDS = 0 KATEX_SERVER = False + +ROOT_DOMAIN_LANDING_PAGE = False