I am trying to fetch from 3rd party API in my frontend app, and an error returned saying
Access to XMLHttpRequest at 'https://theapi.com/api/v1' from origin 'http://localhost:5000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
while I move the http client to backend, and fetch data from there, it works like a charm, I am wondering what's the difference here?
PS: I tried to set User-Agent for my frontend http client request, it doesn't make any changes.