fix(join): use origin + pathname instead of plain location
This commit is contained in:
parent
2171b0c6cd
commit
d9a37f2cf0
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue