From 6c386a4c30b585a8040fec81efde2ab971dc532c Mon Sep 17 00:00:00 2001 From: Kerboul Date: Thu, 16 Jan 2025 19:16:48 +0000 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20l'URL=20d'origine?= =?UTF-8?q?=20pour=20le=20middleware=20CORS=20dans=20api.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routes/api.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/routes/api.js b/routes/api.js index eec6f44..0349928 100644 --- a/routes/api.js +++ b/routes/api.js @@ -10,9 +10,8 @@ const video = require('../utils/video'); const dbTester = require('../test/dbTester'); const cors = require('cors'); // Import the cors package -// Use the cors middleware router.use(cors({ - origin: 'http://localhost:5500', // Replace with your frontend URL + origin: 'http://127.0.0.1:5500', methods: 'GET,POST,PUT,DELETE', allowedHeaders: 'Content-Type', }));