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?
Was a matter of having 'Authorization' in 'Access-Control-Expose-Headers' in CORS settings for my API
Most helpful comment
Was a matter of having 'Authorization' in 'Access-Control-Expose-Headers' in CORS settings for my API