НК
Size: a a a
НК
KA
KA
НК
KA
🌬М
KA
c.id, а не c._id?KA
KA
НК
НК
НК
KA
НК

KA
Ee
Ee
ВЯ
Access to XMLHttpRequest at 'http://localhost:3000/auth/authorization' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header contains the invalid value 'YOUR-DOMAIN.TLD'.я уже перепробовал много вариантов и решение пока не нашел
xhr.js:177 POST http://localhost:3000/auth/authorization net::ERR_FAILED
app.use(function(req, res, next) {
res.header("Access-Control-Allow-Origin", "http://localhost:8080/"); // update to match the domain you will make the request from
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
next();
});
с клиента хедеры отправляю const instance = axios.create({
withCredentials: true,
baseURL: "http://localhost:3000/",
headers: {
"Access-Control-Allow-Origin": "*",
},
});