Closed pford68 closed 7 years ago
Hi, the library does only proxying over angular's http service so this is all that you have from the original response. According to this issue you won't get those headers anyways via vanilla XHR API.
In short you have to specify exactly names of the headers you want have access to via access-control-expose-headers: 'name-of-expose-header'
That's for the quick response. Turns out the answer was none of the above--something simple and obvious (in retrospect) and that had nothing to do with anything you or I or the commenters in the linked article thought of.
Hmm, interesting... So what was that anyway? 😀
We needed to hit a certain proxy, in short, in order to see the headers, and we configured the wrong hostname in order to receive those headers. The HTML page itself returned those headers, but no AJAX calls went through the proxy, so we received no headers. Obvious now, but in the heat of the moment, no.
Alright, I see now. Glad you solved it.
Hi, I am struggling with an issue in which not all response headers are visible to the response handler. We have a large set of response headers that are not seeing at all:
In the snippet above,
r.headers
only contains two of the headers, while all of the headers show up in the network console (Chrome). The ones that are not visible are CORS headers and some custom x-headers. Any help would be greatly appreciated.