I have javascript code for api (ajax) and I need to send the "date" header to the api-server (the required header), but chrome tells me "refused to set the unsafe header" "Date" and I get the response from the api server as "missing http date header".
I am using jquery.
code example:
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 anyone have any ideas how to fix this?
germes
source share