home: Only serve landing page at root domain on corporate servers.

This commit is contained in:
Aman Agrawal 2022-08-17 17:06:07 +00:00 committed by Tim Abbott
parent e54ded49c4
commit 4b6df8a678
1 changed files with 5 additions and 1 deletions

View File

@ -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)