(more) AJAX failed in Internet Explorer, but was successful in other browsers

Hello, seniors!

recently I encountered some puzzling problems in playing api, but I still couldn"t find a solution after climbing the article, so I sent a post to ask

.

when I load a web page, I trigger an api,api that brings xxx to the backend in headers, which displays normally in chrome, safari and firefox, but ejects problems in IE10. Version: IE10
error shows that xxx does not exist in access-control-allow-headers
but xxx is added to access-control-allow-headers in the backend

.

I use network to see that chrome, safari, and firefox all have two requests, one options, one get,
and IE only options

I use axios, to select ajax as follows

axios.get(URL, {
headers: {
"xxx": key
}
})
.then(function(res) {
// ...
})
.catch(function(error) {
// ...
})

kneel for a solution, thank you!


what system you are, IE10 is not supported above windows8.1. You can use fetch
clipboard.png


error to show that xxx does not exist in access-control-allow-headers
put in the xxx that prompts you, response.addHeader ("Access-Control-Allow-Headers", "xxx");

Menu