Skip to content

Commit 692380b

Browse files
author
manish
committed
updated Index.js in server
1 parent b08fd20 commit 692380b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

server/index.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ const app = express();
66

77
connectDB();
88
// Enable CORS for all methods and origins
9-
app.use(cors({
10-
origin: '*', // Allow requests from any origin
11-
methods: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'], // Allow all methods
12-
allowedHeaders: ['Content-Type', 'Authorization'] // Add necessary headers
13-
}));
9+
app.use(cors());
1410
app.use(express.json());
1511

1612
// Available routes

0 commit comments

Comments
 (0)