Skip to content

Commit

Permalink
Merge pull request #508 from Saksham2k3s/CORS-problem
Browse files Browse the repository at this point in the history
Solved cors issue in server
  • Loading branch information
hustlerZzZ authored Aug 8, 2024
2 parents 2cf39bc + 5e3e4b1 commit 7012538
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const PORT = process.env.PORT || 5000;
// CORS Configuration
app.use(
cors({
origin: "http://localhost:3000", // Adjust this to match your frontend URL
origin: process.env.FRONTEND_URL, // Adjust this to match your frontend URL
methods: ["GET", "POST", "PUT", "DELETE"],
allowedHeaders: ["Content-Type", "Authorization"],
credentials: true, // Allow cookies to be sent with requests
Expand Down

0 comments on commit 7012538

Please sign in to comment.