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 \"D
You can't. Since you are sending a XHR request it MUST be terminated according to the standard when you set a whole list of prohibited headers:
http://www.w3.org/TR/XMLHttpRequest2/#the-setrequestheader-method
You'll need to proxy through your originating url or some other work around.