Mise à jour de l'URL d'origine pour le middleware CORS dans api.js

This commit is contained in:
2025-01-16 19:16:48 +00:00
parent 539d3e218f
commit 6c386a4c30

View File

@@ -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',
}));