CORS Error in API Calls from Browser

I am attempting to make an API call directly from the browser by enabling the “Attempt to make the call from the browser” option. However, when I run my application, I encounter a CORS (Cross-Origin Resource Sharing) error. How can I resolve this issue?

Uncheck the attempt to make the call from browser. If the API doesn’t allow CORS, there’s nothing you can do about that and you need to do call server side.