1
0
mirror of https://github.com/bigchaindb/bigchaindb.git synced 2024-06-10 20:05:02 +02:00

Add workaround for hostname of events api link

addresses #1465
This commit is contained in:
Sylvain Bellemare 2017-05-11 16:13:05 +02:00 committed by Sylvain Bellemare
parent a03806229a
commit 0865f43288

View File

@ -28,4 +28,7 @@ def base_url():
def base_ws_uri():
"""Base websocket uri."""
return 'ws://{host}:{port}'.format(**config['wsserver'])
# TODO Revisit as this is a workaround to address issue
# https://github.com/bigchaindb/bigchaindb/issues/1465.
host = request.environ['HTTP_HOST'].split(':')[0]
return 'ws://{}:{}'.format(host, config['wsserver']['port'])