FIX - Cors Bug

This commit is contained in:
Manik Maity
2024-11-08 22:07:58 +05:30
parent 10425305dd
commit af25c4b5fc

View File

@@ -23,7 +23,10 @@ const io = new Server(httpServer, {
})
app.use(cookieParser());
app.use(cors())
app.use(cors({
origin: "http://localhost:5173",
credentials: true
}))
app.use(express.json())
app.get("/ping", (_req, res) => {
res.json({ message: "pong" })