Mise à jour de la configuration CORS pour autoriser les requêtes depuis localhost

This commit is contained in:
2025-01-16 19:26:54 +00:00
parent 6c386a4c30
commit 6ad9bd65bd

View File

@@ -11,7 +11,7 @@ const dbTester = require('../test/dbTester');
const cors = require('cors'); // Import the cors package const cors = require('cors'); // Import the cors package
router.use(cors({ 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', methods: 'GET,POST,PUT,DELETE',
allowedHeaders: 'Content-Type', allowedHeaders: 'Content-Type',
})); }));