Fix: Update CORS and network config for dev IP access
This commit is contained in:
@@ -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
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user