Fix: server nuxt client directly without proxy

This commit is contained in:
Aram Becker 2023-05-02 10:44:32 +02:00
parent 57994ffb5b
commit a8b7c56bec
7 changed files with 30 additions and 49 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,