I had this project working before, but checking on it there seems to be issues. I wrote the project using VanillaJS and the fetch API.
If I set the mode =
no-cors then I get a response with a status = 0. The code then ends up throwing an error
Uncaught (in promise) SyntaxError: Unexpected end of JSON input.
Removing the mode option from my fetch request ends up with the following error:
Fetch API cannot load https://wind-bow.gomix.me/twitch-api/channels/storbeck/. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://s.codepen.io' is therefore not allowed access. The response had HTTP status code 404. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Does anyone know how I can tell the fetch request to skip/ignore the preflight? It seems like the Twitch API Pass Through won’t respond to an
Thanks for any help.