I am creating an ajax call as follows:
beforeSend: function(xhr) {
xhr.setRequestHeader("Authorization", make_base_auth(username, password));
},
The resultant HTTP request header contains
Access-Control-Request-Headers: authorization
When I issue the same request from the browser directly the request header correctly contains
Authorization: Basic ZG<etc>
Looking at the JQuery routines, jquery-1.20.2
, the setRequestHeader
is correctly adding the header name and value pair to the cached list of headers.
The AJAX call throws an error as a result of the authorization failing. (ZGetcetc matches what I see in the successful manual attempt)