Use correct websocket protocol when using websocket_host/port settings
This commit is contained in:
parent
e71de0786e
commit
d211b92447
@ -39,7 +39,10 @@ class IndexHandler(tornado.web.RequestHandler):
|
||||
port = config['http']['port']
|
||||
logger.warning('Musicbox websocket_port not specified, '
|
||||
'using %s', port)
|
||||
ws_url = "ws://%s:%d/mopidy/ws" % (host, port)
|
||||
protocol = 'ws'
|
||||
if self.request.protocol == 'https':
|
||||
protocol = 'wss'
|
||||
ws_url = "%s://%s:%d/mopidy/ws" % (protocol, host, port)
|
||||
|
||||
self.__dict = {
|
||||
'version': MusicBoxExtension.version,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user