subdomains: Add support for aliases of the root subdomain.

We default to counting "www" as such an alias.
This commit is contained in:
Tim Abbott
2016-08-18 20:30:16 -07:00
parent ea39fb2556
commit a4e5450ace
2 changed files with 3 additions and 0 deletions

View File

@@ -193,6 +193,8 @@ def get_subdomain(request):
if index == -1:
return ""
subdomain = domain[0:index]
if subdomain in settings.ROOT_SUBDOMAIN_ALIASES:
return ""
return subdomain
def check_subdomain(realm_subdomain, user_subdomain):