Refactored logic in autoupdate.py concerning wsgi network connection variables. Fixed #1929."
This commit is contained in:
parent
15bb62b39a
commit
af0f8fcac6
@ -97,15 +97,14 @@ class OpenSlidesSockJSConnection(SockJSConnection):
|
|||||||
object_url.
|
object_url.
|
||||||
"""
|
"""
|
||||||
# Join network location with object URL.
|
# Join network location with object URL.
|
||||||
if RUNNING_HOST == '0.0.0.0':
|
if settings.OPENSLIDES_WSGI_NETWORK_LOCATION:
|
||||||
# Windows can not connect to 0.0.0.0. So connect to localhost instead
|
wsgi_network_location = settings.OPENSLIDES_WSGI_NETWORK_LOCATION
|
||||||
local_host = 'localhost'
|
|
||||||
else:
|
else:
|
||||||
local_host = RUNNING_HOST
|
if RUNNING_HOST == '0.0.0.0':
|
||||||
|
# Windows can not connect to 0.0.0.0, so connect to localhost instead.
|
||||||
wsgi_network_location = (
|
wsgi_network_location = 'http://localhost:{}'.format(RUNNING_PORT)
|
||||||
settings.OPENSLIDES_WSGI_NETWORK_LOCATION or
|
else:
|
||||||
'http://{}:{}'.format(local_host, RUNNING_PORT))
|
wsgi_network_location = 'http://{}:{}'.format(RUNNING_HOST, RUNNING_PORT)
|
||||||
url = ''.join((wsgi_network_location, object_url))
|
url = ''.join((wsgi_network_location, object_url))
|
||||||
|
|
||||||
# Send out internal HTTP request to get data from the REST api.
|
# Send out internal HTTP request to get data from the REST api.
|
||||||
|
Loading…
Reference in New Issue
Block a user