Fix cors settings for websocket when it's set for any origin

This commit is contained in:
Stênio Aníbal 2024-08-14 10:36:48 -03:00
parent e385932bbc
commit 707ac9db2c

View File

@ -13,7 +13,7 @@ export const initIO = (httpServer: Server) => {
if (configService.get<Websocket>('WEBSOCKET')?.ENABLED) {
io = new SocketIO(httpServer, {
cors: {
origin: cors,
origin: cors.includes('*') ? '*' : cors,
},
});