02-11-2017 09:46
02-11-2017 09:46
Dear All,
I’m trying to get the "Fitbit-Rate-Limit-Remaining" and "Fitbit-Rate-Limit-Limit" headers, from the response of the Angular 2 REST. Unfortunatelly I can see only these headers: "Content-Type", "Cache-Control" and "Content-Language".
For testing purpose, I created a custom header on a test server. And was been received by the Angular 2 REST, but only if the header "Access-Control-Expose-Headers" was set to the custom header.
Example: "Access-Control-Expose-Headers: Fitbit-Rate-Limit-Limit, Fitbit-Rate-Limit-Remaining, Fitbit-Rate-Limit-Reset"
Is the "Access-Control-Expose-Headers" header set on your server API?
Thank you for the help!
02-14-2017 16:25
02-14-2017 16:25
@Mark81 Maybe it's an issue with Angular 2 REST? Because I can see the rate limit headers in the response when I use curl.
02-15-2017 01:29 - edited 02-15-2017 02:49
02-15-2017 01:29 - edited 02-15-2017 02:49
It seems that the browser receive all the headers, but it won't expose all the headers to JavaScript. The extra headers to expose are to be declared on the "Access-Control-Expose-Headers" header on server side. Information: https://www.w3.org/TR/cors/#access-control-expose-headers-response-header
I tested this behaviour on a test server. Please can a moderator ask the developer team to check? Thanks a lot! 🙂
03-22-2017 04:57
03-22-2017 04:57
Any news?
04-15-2017 05:48 - edited 04-15-2017 05:59
04-15-2017 05:48 - edited 04-15-2017 05:59
I found what was the issue: if the callback URL isn't SSL, on JavaScript the headers aren't received. 🙂