Superagent: response.headers not showing all header values

Created on 12 Aug 2016  路  1Comment  路  Source: visionmedia/superagent

I'm making a request to an API and I get a refresh token back in the header. When I'm using superagent and I get a response and look at response.headers, it only contains

{
    cache-control: "private, must-revalidate"
    content-type: "application/json"
}

although when I use postman or look at the response I get in my broswer, the header has much more info, in particular I'm trying to get the value of the header 'Authorization' property which contains a JWT token.

How can I set which header properties show up in response.headers?

Most helpful comment

Was a matter of having 'Authorization' in 'Access-Control-Expose-Headers' in CORS settings for my API

>All comments

Was a matter of having 'Authorization' in 'Access-Control-Expose-Headers' in CORS settings for my API

Was this page helpful?
0 / 5 - 0 ratings