03-01-2022 14:19 - edited 03-01-2022 14:20
03-01-2022 14:19 - edited 03-01-2022 14:20
I want to use fetch from the settings jsx, but it is getting blocked by CORS.
Access to fetch at 'SERVER_URL' from origin 'https://app-settings.fitbitdevelopercontent.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
I have no control over the server to add the Access-Control-Allow-Origin header. How can I get around this? Can I fetch it from the companion and send it to the settings through messaging? Should I store it in a file?