Skip to content

Commit

Permalink
temparorly commented out the client server origin
Browse files Browse the repository at this point in the history
  • Loading branch information
farooqpk committed May 8, 2024
1 parent 486ae35 commit 5fb3db4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ const server = http.createServer(app);

app.use(
(cors as (options: cors.CorsOptions) => express.RequestHandler)({
origin: true,
// origin: process.env.CLIENT_URL,
credentials: true,
methods: "GET,POST,PUT,DELETE",
})
);
app.use(express.json());
Expand All @@ -27,7 +26,10 @@ app.use("/", router);
app.use(urlencoded({ extended: true }));

const io: Server = new Server(server, {
cors: { origin: process.env.CLIENT_URL, credentials: true },
cors: {
// origin: process.env.CLIENT_URL,
credentials: true,
},
});

export const ONLINE_USERS_SOCKET: Map<string, string> = new Map();
Expand Down

0 comments on commit 5fb3db4

Please sign in to comment.