def base_ws_uri():
    """Base websocket URL that is advertised to external clients.

    Useful when the websocket URL advertised to the clients needs to be
    customized (typically when running behind NAT, firewall, etc.)
    """

    config_wsserver = config['wsserver']

    scheme = config_wsserver['advertised_scheme']
    host = config_wsserver['advertised_host']
    port = config_wsserver['advertised_port']

    return '{}://{}:{}'.format(scheme, host, port)
Base websocket URL that is advertised to external clients.

Useful when the websocket URL advertised to the clients needs to be
customized (typically when running behind NAT, firewall, etc.)
bigchaindb/web/views/base.py