diff --git a/client/layouts/default.vue b/client/layouts/default.vue index 95f8560d..9121561e 100644 --- a/client/layouts/default.vue +++ b/client/layouts/default.vue @@ -357,7 +357,8 @@ export default { teardown: false, transports: ['websocket'], upgrade: false, - reconnection: true + reconnection: true, + path: `${this.$config.routerBasePath}/socket.io` }) this.$root.socket = this.socket console.log('Socket initialized') diff --git a/server/SocketAuthority.js b/server/SocketAuthority.js index af8204c6..a7182936 100644 --- a/server/SocketAuthority.js +++ b/server/SocketAuthority.js @@ -103,7 +103,8 @@ class SocketAuthority { cors: { origin: '*', methods: ['GET', 'POST'] - } + }, + path: `${global.RouterBasePath}/socket.io` }) this.io.on('connection', (socket) => {