Answer the question
In order to leave comments, you need to log in
How to get rid of cors error response to preflight request doesn't pass access control check: It does not have HTTP ok status.?
I send a request like this with headers like this:
return fetch(url, {
headers: {
'Authorization': `Bearer eyJhbGciOiJIUzI1NiJ9.eyJ2zdWIiOiIyMDQ4NTU4ODAiLCJpYXQiOjE2MfazUwNjMwNzksImV4cCI6MTY0MzcwMzA3OX0.vA7WaN2Ep2fmGOVbZPt7Rw7gwt0msKyylzrKkh7dLOxB0`,
'accept': "*/*",
},
});
}
Answer the question
In order to leave comments, you need to log in
Most likely the server is not able to process OPTION request. Postman and node don't care about the same origin policy, so they don't try to send an OPTION request.
Please include the answer from the server in your question, then it will be possible to give a more accurate answer.
Yes, unlike chrome, firefox in the developer console shows you both requests, open the network tab and take a screenshot here.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question