Fix: apply base path to client and websocket

This commit is contained in:
sandreas 2022-06-01 22:07:54 +02:00 committed by Aram Becker
parent dadd41cb5c
commit 97e8d4f5c0
6 changed files with 565 additions and 9 deletions

View file

@ -68,12 +68,12 @@ class SocketAuthority {
initialize(Server) {
this.Server = Server
this.io = new SocketIO.Server(this.Server.server, {
this.io = (new SocketIO.Server(this.Server.server, {
cors: {
origin: '*',
methods: ["GET", "POST"]
}
})
})).of(global.RouterBasePath || "/")
this.io.on('connection', (socket) => {
this.clients[socket.id] = {
id: socket.id,