I'm making cross origin ajax requests using jquery and I wanted to set headers in the request like this-- but it says that it is an improper request:
$.ajax({
url: address,
headers:{
'Access-Control-Allow-Origin': '*'
}
success: function(result) {
pipelineCallback(result, guid_key, j, missing_program);
},
error: function(result) {
console.log(result);
},
async: true
});
Caveat: When I don't set the header and use this CORS chrome plugin the cross-origin request goes through fine... whats the issue?
Plugin link(theres a public github repo too): https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=en