fix: diable cors for websocket
This commit is contained in:
@@ -19,12 +19,13 @@ export class ChatGateway {
|
||||
this.io = new Server(server, {
|
||||
path: "/ws-chat",
|
||||
// addTrailingSlash: false,
|
||||
cors: {
|
||||
origin: true,
|
||||
allowedHeaders: ["Authorization"],
|
||||
credentials: true,
|
||||
methods: ["GET", "POST"],
|
||||
},
|
||||
// cors: {
|
||||
// origin: true,
|
||||
// allowedHeaders: ["Authorization"],
|
||||
// credentials: true,
|
||||
// methods: ["GET", "POST"],
|
||||
// },
|
||||
cors: { origin: "*" },
|
||||
});
|
||||
this.io.on("connection", (socket: Socket) => this.handleConnection(socket));
|
||||
return this.io;
|
||||
|
||||
Reference in New Issue
Block a user