Fix errors

This commit is contained in:
Orionis312050 committed 2026-04-16 19:35:58 +02:00
1 parent bb053a6ebe
commit 91c52782fe
2 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -17,7 +17,7 @@ const app = express();
const httpServer = createServer(app);
const io = new Server(httpServer, {
cors: {
origin: ["http://localhost:5173"], // Spécifier l'origine pour les credentials
origin: process.env.CORS_ORIGIN ? [process.env.CORS_ORIGIN, "http://localhost:5173"] : ["http://localhost:5173"], // Spécifier l'origine pour les credentials
methods: ["GET", "POST", "DELETE", "OPTIONS"],
credentials: true
}
@@ -29,7 +29,7 @@ io.use(socketAuthMiddleware);
const logTracker = new LogTracker(io, prisma);
app.use(cors({
origin: "http://localhost:5173",
origin: process.env.CORS_ORIGIN ? [process.env.CORS_ORIGIN, "http://localhost:5173"] : ["http://localhost:5173"],
credentials: true
}));
app.use(express.json());