Fix: Update CORS and network config for dev IP access

This commit is contained in:
Your Name
2026-04-18 01:45:27 +00:00
parent dabd1d5b18
commit 425fb007f3
+4 -2
View File
@@ -31,9 +31,11 @@ const io = new Server(httpServer, {
});
// Security middleware
app.use(helmet());
app.use(helmet({
crossOriginResourcePolicy: { policy: "cross-origin" }
}));
app.use(cors({
origin: process.env.FRONTEND_URL || 'http://localhost:3000',
origin: true, // Allow all origins in dev to fix the IP issue
credentials: true
}));