User-defined SSL settings; Git.io hosted app
This commit is contained in:
@ -63,7 +63,8 @@ const localstorageMiddleware = (function(){
|
||||
'mopidy',
|
||||
{
|
||||
host: action.config.host,
|
||||
port: action.config.port
|
||||
port: action.config.port,
|
||||
ssl: action.config.ssl
|
||||
}
|
||||
);
|
||||
break;
|
||||
|
||||
@ -205,7 +205,7 @@ const MopidyMiddleware = (function(){
|
||||
var state = store.getState()
|
||||
|
||||
socket = new Mopidy({
|
||||
webSocketUrl: 'ws'+(window.location.protocol === 'https:' ? 's' : '')+'://'+state.mopidy.host+':'+state.mopidy.port+'/mopidy/ws/',
|
||||
webSocketUrl: 'ws'+(state.mopidy.ssl ? 's' : '')+'://'+state.mopidy.host+':'+state.mopidy.port+'/mopidy/ws/',
|
||||
callingConvention: 'by-position-or-by-name'
|
||||
})
|
||||
|
||||
|
||||
@ -16,9 +16,9 @@ export default function reducer(mopidy = {}, action){
|
||||
|
||||
case 'MOPIDY_SET_CONFIG':
|
||||
return Object.assign({}, mopidy, {
|
||||
host: action.host,
|
||||
port: action.port,
|
||||
ssl: action.ssl
|
||||
host: action.config.host,
|
||||
port: action.config.port,
|
||||
ssl: action.config.ssl
|
||||
});
|
||||
|
||||
case 'MOPIDY_CHANGE_TRACK':
|
||||
|
||||
Reference in New Issue
Block a user