CORS error when using fetch with the JIRA connect app tutorial

Hello, I am new to Jira and I completed the Jira connect app tutorial at the following link
https://developer.atlassian.com/cloud/jira/platform/getting-started-with-connect/
However, when I use REST API call to my own board (which works if I call it directly in the browser link) in the following code within the helloworld.html file


and follow through the ngrok method in the tutorial of uploading my addon, the following CORS error occurs

Access to fetch at https://mydomain.atlassian.net/rest/api/2/search?jql=ORDER%20BY%20Created&maxResults=100 from origin https://f9877961ab82.ngrok.io has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: 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’ve tried to whitelist my computer’s IP on my board as mentioned in the following link
https://jira.atlassian.com/browse/JRASERVER-65362?error=login_required&error_description=Login+required&state=c22d15f2-e3c7-4e35-98b0-a7858db054ea

I succeeded in fetching the pokemon API in the commented portion of the picture and displaying the information on the addon website, but I can’t figure out displaying the information of the JIRA REST API.

Any help is appreciated :smiley:
Thanks in advance.