cosmos / cosmjs

The Swiss Army knife to power JavaScript based client solutions ranging from Web apps/explorers over browser extensions to server-side clients like faucets/scrapers.
https://cosmos.github.io/cosmjs/
Apache License 2.0
655 stars 344 forks source link

How can I Bypass CORS in connectWithSigner? #1520

Open shukr-acharya opened 11 months ago

shukr-acharya commented 11 months ago

The RPC url passed here is throwing CORS error how can I use the RPC url?

const signerClient = await SigningStargateClient.connectWithSigner(rpcUrl, signer, { broadcastPollIntervalMs: 300, });

webmaster128 commented 11 months ago

You need to tell your node operator to open up CORS. There is no way I am aware off to disable all CORS checks client-side. I doubt this would be possible in browsers.

shukr-acharya commented 11 months ago

would it be possible to do it by using proxy?

webmaster128 commented 11 months ago

yes