From 6ad9bd65bd8b47e691ab7c1580c52fbb331714a9 Mon Sep 17 00:00:00 2001 From: Kerboul Date: Thu, 16 Jan 2025 19:26:54 +0000 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20la=20configuration?= =?UTF-8?q?=20CORS=20pour=20autoriser=20les=20requ=C3=AAtes=20depuis=20loc?= =?UTF-8?q?alhost?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routes/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/api.js b/routes/api.js index 0349928..26ec23a 100644 --- a/routes/api.js +++ b/routes/api.js @@ -11,7 +11,7 @@ const dbTester = require('../test/dbTester'); const cors = require('cors'); // Import the cors package router.use(cors({ - origin: 'http://127.0.0.1:5500', + origin: ['http://127.0.0.1:5500', 'http://localhost:5500'], methods: 'GET,POST,PUT,DELETE', allowedHeaders: 'Content-Type', }));