I’m trying to use ethers.js with an Infura provider. When developing locally, trying to make a request from a frontend web app, I’m getting the following error.
“Access to fetch at ‘https://ropsten.infura.io/v3/<PROJECT_ID>’ from origin ‘http://localhost:4200’ 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.”
Any ideas how to resolve this?