mirror of https://github.com/zulip/zulip.git
log_into_subdomain: Fix realm creation on servers using an IP address.
While it's totally fine to put a leading '.' before the cookie domain for normal hostnames and browsers will just strip them, if you're using an IP address, it doesn't work, because .127.0.0.1 (for example) is just invalid, and the cookie won't be set. This fixes an issue where after installing with an IP address, realm creation would end with being stuck at a blank page for /accounts/login/subdomain/.
This commit is contained in:
parent
730c77c7df
commit
4439dbf781
|
@ -52,7 +52,7 @@ def redirect_and_log_into_subdomain(realm, full_name, email_address,
|
|||
reverse('zerver.views.auth.log_into_subdomain')
|
||||
])
|
||||
|
||||
domain = '.' + settings.EXTERNAL_HOST.split(':')[0]
|
||||
domain = settings.EXTERNAL_HOST.split(':')[0]
|
||||
response = redirect(subdomain_login_uri)
|
||||
|
||||
data = {'name': full_name, 'email': email_address, 'subdomain': realm.subdomain,
|
||||
|
|
Loading…
Reference in New Issue