fix(core): update

This commit is contained in:
Philipp Kunz 2022-12-29 11:18:15 +01:00
parent ba38dae64f
commit 38058aba57
2 changed files with 8 additions and 2 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@pushrocks/smartsocket',
version: '2.0.12',
version: '2.0.13',
description: 'easy and secure websocket communication'
}

View File

@ -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);