diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index fd8a9f6..7bb46ce 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@pushrocks/smartsocket', - version: '2.0.12', + version: '2.0.13', description: 'easy and secure websocket communication' } diff --git a/ts/smartsocket.classes.smartsocket.ts b/ts/smartsocket.classes.smartsocket.ts index 9fed0f5..9ad4386 100644 --- a/ts/smartsocket.classes.smartsocket.ts +++ b/ts/smartsocket.classes.smartsocket.ts @@ -47,7 +47,13 @@ export class Smartsocket { */ public async start() { const socketIoModule = await this.smartenv.getSafeNodeModule('socket.io'); - this.io = new socketIoModule.Server(await this.socketServer.getServerForSocketIo()); + this.io = new socketIoModule.Server(await this.socketServer.getServerForSocketIo(), { + cors: { + allowedHeaders: '*', + methods: '*', + origin: '*', + } + }); await this.socketServer.start(); this.io.on('connection', (socketArg) => { this._handleSocketConnection(socketArg);