Correct check for HTTPS protocol
This commit is contained in:
@ -78,7 +78,7 @@ const PusherMiddleware = (function(){
|
|||||||
connection.username = connection.username.replace(/\W/g, '')
|
connection.username = connection.username.replace(/\W/g, '')
|
||||||
|
|
||||||
socket = new WebSocket(
|
socket = new WebSocket(
|
||||||
'ws'+(state.mopidy.port === '443' ? 's' : '')+'://'+state.mopidy.host+':'+state.mopidy.port+'/iris/ws',
|
'ws'+(window.location.protocol === 'https:' ? 's' : '')+'://'+state.mopidy.host+':'+state.mopidy.port+'/iris/ws',
|
||||||
[ connection.clientid, connection.connection_id, connection.username ]
|
[ connection.clientid, connection.connection_id, connection.username ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user