Skip to content

Commit

Permalink
Solved cors issue in server
Browse files Browse the repository at this point in the history
  • Loading branch information
Saksham2k3s committed Aug 8, 2024
1 parent f385a21 commit 5e3e4b1
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 5e3e4b1

Please sign in to comment.