Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
home: Redirect https://auth.zuliphostname/ to https://zuliphostname/.
Alex Vandiveradf9e8de3dcc
diff --git a/zerver/tests/test_home.py b/zerver/tests/test_home.pyindex b3dd3a539f9..73642c2987e 100644--- a/zerver/tests/test_home.py+++ b/zerver/tests/test_home.py@@ -1085,6 +1085,13 @@ class HomeTest(ZulipTestCase):result = self._get_home_page()self._sanity_check(result)+ def test_special_subdomains_homepage(self) -> None:+ self.login("hamlet")+ with patch("zerver.views.home.get_subdomain", return_value="auth"):+ result = self._get_home_page()+ self.assertEqual(result.status_code, 302)+ self.assertEqual(result["Location"], "http://testserver")+def send_test_message(self,content: str,diff --git a/zerver/views/home.py b/zerver/views/home.pyindex f9631126545..dfdc0ecf603 100644--- a/zerver/views/home.py+++ b/zerver/views/home.py@@ -154,6 +154,8 @@ def home(request: HttpRequest) -> HttpResponse:return hello_view(request)+ if subdomain == settings.SOCIAL_AUTH_SUBDOMAIN:+ return redirect(settings.ROOT_DOMAIN_URI)realm = get_realm_from_request(request)if realm is None:return render(request, "zerver/invalid_realm.html", status=404)