diff --git a/bigchaindb/web/views/base.py b/bigchaindb/web/views/base.py index 0c226d7d..e4ae980b 100644 --- a/bigchaindb/web/views/base.py +++ b/bigchaindb/web/views/base.py @@ -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'])