I have a javascript code to be used for api (ajax) and I need to send header "date" to api-server (required header), but chrome tells me 'refused to set unsafe header "Date" ' and I get response from api-server like "missing required http date header".
I'm using jquery.
code sample:
var d = new Date();
var headers = {};
headers["Date"] = d.toUTCString();
jQuery.ajax({
url: '<some HTTPS url>'
type: "get",
crossDomain: true,
headers: headers,
....
})
the same code works fine in firefox. does anybody have any ideas how to fix it?