Replymessage unavailable
از چت جی پی تی پرسیدم میگه کروم داستانش با فایرفاکس فرق میکنه و تو این چیزا سختگیرتره و قبل از فرستادن ریکوئست اصلی یه درخواست هایی میکنه که اگه مشکل کورس باشه ریکوئست رو اصلا نفرسته.
واسه حلش هم این راه رو پیشنهاد داد:
const cors = require('cors');
// Use cors middleware with default settings
app.use(cors()); // Alternatively, configure it to allow specific origins
// app.use(cors({ // origin: 'http://your-allowed-origin.com', // methods: ['GET', 'POST', 'PUT', 'DELETE'], // credentials: true, // })); // Your routes here