From 4b6df8a67827babd0da3a2326a4f45c560c83f7c Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Wed, 17 Aug 2022 17:06:07 +0000 Subject: [PATCH] home: Only serve landing page at root domain on corporate servers. --- zerver/views/home.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zerver/views/home.py b/zerver/views/home.py index d2f6cd2eb0..bc13b5e679 100644 --- a/zerver/views/home.py +++ b/zerver/views/home.py @@ -115,7 +115,11 @@ def home(request: HttpRequest) -> HttpResponse: # If settings.ROOT_DOMAIN_LANDING_PAGE and this is the root # domain, send the user the landing page. - if settings.ROOT_DOMAIN_LANDING_PAGE and subdomain == Realm.SUBDOMAIN_FOR_ROOT_DOMAIN: + if ( + settings.ROOT_DOMAIN_LANDING_PAGE + and subdomain == Realm.SUBDOMAIN_FOR_ROOT_DOMAIN + and settings.CORPORATE_ENABLED + ): return hello_view(request) realm = get_realm_from_request(request)