Use open client API from JavaScript code - CORS is blocking requests
I am using chromebook and I implemented a website that acts as a status bar (showing various notifications about calendar, weather etc.).
I want to add support for showing pushover notifications but I cannot access messages api:
Access to fetch at 'https://api.pushover.net/1/messages.json?secret=xxx&device_id=yyy' from origin 'https://mywebsite.com' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://client.pushover.net' that is not equal to the supplied origin. Have the server send the header with a valid value, or, if an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
The problem is with theĀ Access-Control-Allow-Origin header returned by a pushover server that allows browser requests from client.pushover.net only. Can this be changed to allow open client implementation also in JavaScript?
Note that "set the request's mode to 'no-cors'" is not an option - while browser will allow such requests, the response will not be readable by the javascript code.