When using the BSC Archive node as HttpProvider, I’m instantly greeted with the following CORS error:
Access to XMLHttpRequest at 'https://speedy-nodes-nyc.moralis.io/{redacted}/bsc/mainnet/archive' from origin 'http://localhost:3000' 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.
Obviously this is coming from localhost, but we’re having the same issues in production.
You can reconstruct this problem with the following code:
const web3 = new Web3(
new Web3.providers.HttpProvider(
'https://speedy-nodes-nyc.moralis.io/{redacted}/bsc/mainnet/archive',
{ timeout: 10000 }
)
)
web3.eth.getBlockNumber().then(console.log).catch(console.error)
The reason I think this might be a technical problem is that we’ve been reporting error events from Moralis using Sentry. As you can see, since this morning there is a major peak.
I’m not sure if I can share my Node ID here safely, that’s why it’s redacted. Any help would be appreciated.