Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

run-dev: Revert back to localhost, not localhost.localdomain.

Alex Vandiver88e4b597d8f5
diff --git a/tools/run-dev b/tools/run-dev
index 857891b7975..934fd777919 100755
--- a/tools/run-dev
+++ b/tools/run-dev
@@ -447,7 +447,7 @@ async def serve() -> None:
# the default/zulip subdomain.
default_hostname = "zulip." + os.uname()[1].lower()
else:
- default_hostname = "localhost.localdomain"
+ default_hostname = "localhost"
external_host = os.getenv("EXTERNAL_HOST", f"{default_hostname}:{proxy_port}")
http_protocol = "https" if options.behind_https_proxy else "http"
diff --git a/zerver/checks.py b/zerver/checks.py
index 42008096ca1..3e81ee6c6a7 100644
--- a/zerver/checks.py
+++ b/zerver/checks.py
@@ -54,7 +54,7 @@ def check_external_host_setting(
errors = []
hostname = settings.EXTERNAL_HOST
- if "." not in hostname and os.environ.get("ZULIP_TEST_SUITE") != "true":
+ if "." not in hostname and os.environ.get("ZULIP_TEST_SUITE") != "true" and settings.PRODUCTION:
suggest = ".localdomain" if hostname == "localhost" else ".local"
errors.append(
checks.Error(
diff --git a/zerver/tests/test_checks.py b/zerver/tests/test_checks.py
index 015506960db..a52e58df065 100644
--- a/zerver/tests/test_checks.py
+++ b/zerver/tests/test_checks.py
@@ -35,6 +35,7 @@ class TestChecks(ZulipTestCase):
ZULIP_ADMINISTRATOR=None,
)
+ @override_settings(DEVELOPMENT=False, PRODUCTION=True)
def test_checks_external_host_domain(self) -> None:
message_re = r"\(zulip\.E002\) EXTERNAL_HOST \(\S+\) does not contain a domain part"
try: