Has anyone encountered the issue where jQuery's xhr method, getAllResponseHeaders, only displays the "Content-Type" header when trying to retrieve response headers from an ajax request?
Below are the response headers:
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: If-Modified-Since, Cache-Control, Content-Type, Keep-Alive, X-Requested-With, Authorization
Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS
Access-Control-Allow-Origin: *
Access-Control-Max-Age: 1728000
Authorization: apikey="apikey1" AuthenticationToken="62364GJHGJHG"
Connection: keep-alive
Content-Length: 240
Content-Type: application/json; charset=utf-8
X-Powered-By: Express
The success function looks like this:
params.success = function (response, textStatus, jqXHR) {
console.log(jqXHR.getAllResponseHeaders())
}
This is the output it logs:
Content-Type: application/json; charset=utf-8