0

When executing a query through javascript I get a CORS error:

Access to fetch at 'http://access.mainnet.nodes.onflow.org:9000/v1/scripts?block_height=sealed' from origin 'http://localhost:3000' has been blocked by CORS policy: 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.

This error happens when querying from testnet and mainnet. Also happens from localhost or from a site running in Vercel.

The rpcs I tried: https://access-testnet.onflow.org/ http://access.devnet.nodes.onflow.org:9000/ http://flow-testnet.g.alchemy.com:443/ (also tried their mainnet counterparts)

user1596863
  • 116
  • 3

1 Answers1

0

Solved the problem using these rpcs:

user1596863
  • 116
  • 3