Skip to content

Commit

Permalink
fix cors
Browse files Browse the repository at this point in the history
  • Loading branch information
jdshaeffer committed Oct 22, 2023
1 parent 145d045 commit a696707
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions server/socketServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@ const socket_io_1 = require("socket.io");
const socketConfig = process.env.NODE_ENV === 'prod'
? {
path: '/socket.io',
cors: {
origin: ['https://jdshaeffer.github.io'],
methods: ['GET', 'POST'],
},
}
: {
cors: {
origin: ['http://localhost:3000'],
origin: ['http://localhost:3000', 'https://jdshaeffer.github.io'],
methods: ['GET', 'POST'],
},
};
Expand Down

0 comments on commit a696707

Please sign in to comment.