Hello, I was trying to fetch data from API but I am getting this error I tried with no-cors mode too. The client is not able to access the API here but I can access the data in a node server. Is there any workaround for this?
Or is there any example project which integrates an API that i can take a reference of?
The error says ‘No ‘Access-Control-Origin’ header is present on the requested resource’
This means the issue is on the services/API side that doesn’t allow it to be called from different domains. It works on your Node Server because either its served under the same domain or your local PC.
The APIs/services side needs to configured to allow calls from whatever domain you are requesting from (eg playcanvas.com)
2 Likes
Thanks it has been fixed now