From d9a37f2cf02975924e26945a3c2655c6eb196f5d Mon Sep 17 00:00:00 2001 From: Travis Shivers <ttshivers@gmail.com> Date: Fri, 4 Sep 2020 20:54:44 -0500 Subject: [PATCH] fix(join): use origin + pathname instead of plain location --- src/store/modules/synclounge/actions.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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());