Skip to content

Commit

Permalink
fix(socket.io): changing how cors is handled
Browse files Browse the repository at this point in the history
  • Loading branch information
rallieon committed Jul 1, 2021
1 parent 6280c51 commit 2b3e279
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/haste-game-client/src/socket/socketManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export class SocketManager {
this.socket = io(serverUrl, {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
auth: { token },
withCredentials: true,
});
this.initializeEvents();
}
Expand Down
1 change: 1 addition & 0 deletions packages/haste-game-server/src/server/socketServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export class SocketServer {
cors: {
origin: process.env.CORS_URL,
methods: ['GET', 'POST'],
credentials: true,
},
});

Expand Down

0 comments on commit 2b3e279

Please sign in to comment.