anyone else who tries to read smart contract data through Infura and process it on front-end but gets 'CORS' error? My DAPP works fine in Google Chrome and has no issue in fetching the smart contract data. Same on Internet Explorer. The problem is when I use Microsoft Edge that I'm getting this:
My web3 implementation is correct:
import Web3 from 'web3';
let web3;
if (typeof window !== 'undefined' && typeof window.web3 !== 'undefined') {
// metamask is running
web3 = new Web3(window.web3.currentProvider);
} else {
// set up provider through infura
const provider = new Web3.providers.HttpProvider(
// pass url of remote node
'https://rinkeby.infura.io/v3/censored');
web3 = new Web3(provider);
}
export default web3;