Hi.
I’m currently unable to access the HTTP API’s x-ratelimit-*
response headers via JavaScript.
I can see them in my browser console when I inspect network requests, but am unable to access them via JavaScript programatically (e.g. via axios, fetch, etc).
A little Googling led me to believe this is a CORS issue, and my inability to access them is because the HTTP API hasn’t set Access-Control-Expose-Headers
for those x-ratelimit-*
values, like so:
Access-Control-Expose-Headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
Can anyone confirm they have experienced the same issue and if so, is LIFX able to add the appropriate Access-Control-Expose-Headers
value to the HTTP API’s responses?
If I’m completely wrong or missing something obvious, apologies in advance.
Thanks!