diff --git a/src/store/modules/synclounge/actions.js b/src/store/modules/synclounge/actions.js index 1c3beef1..ae02860d 100644 --- a/src/store/modules/synclounge/actions.js +++ b/src/store/modules/synclounge/actions.js @@ -32,7 +32,8 @@ export default { ESTABLISH_SOCKET_CONNECTION: async ({ getters, commit, dispatch }) => { await dispatch('DISCONNECT_IF_CONNECTED'); - const properBase = new URL(getters.GET_SERVER, window.location); + const currentUrl = new URL(window.location.pathname, window.location.origin); + const properBase = new URL(getters.GET_SERVER, currentUrl); const url = combineUrl('socket.io', properBase.toString()); console.log('ESTABLISH_SOCKET_CONNECTION', url.toString());