Skip to content

Commit

Permalink
read origin from env file for cors
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrahim-nazari committed Mar 6, 2024
1 parent 2b1fbcf commit 72073da
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,10 @@ const channelQuestion: ChannelQuestionType = {};

//New imports
const httpServer = createServer(app);
const origin = process.env.ORIGIN;
const socketIO = new Server(httpServer, {
cors: {
origin: [
"http://localhost:3000",
"https://convose-flashcard-activity.netlify.app",
"https://www.convose.com",
],
origin,
},
});

Expand Down

0 comments on commit 72073da

Please sign in to comment.