laboratory icon indicating copy to clipboard operation
laboratory copied to clipboard

Feature request: Add support for local instances of RPC nodes

Open Shaptic opened this issue 1 year ago • 1 comments

What problem does your feature solve?

It appears that when specifying a local instance of an infra instance (e.g., http://localhost:8000 in a Custom Network's "RPC URL" field), queries no longer work. The reported errors are:

TypeError: NetworkError when attempting to fetch resource.

and in the JavaScript console (on Firefox) there is:

Content-Security-Policy: The page’s settings blocked the loading of a resource (connect-src) at http://localhost:8123/ because it violates the following directive: “connect-src 'self' https://9sl3dhr1twv1.statuspage.io/api/v2/ https://stellar-mainnet.liquify.com/ https://stellar.liquify.com/ https://soroban-rpc.mainnet.stellar.gateway.fm/ https://soroban-rpc.testnet.stellar.gateway.fm/ https://*.stellar.org”

Secondarily, it'd be great to be able to edit the fields for mainnet, since copy-pasting stuff into the Custom Network option is a tiny bit less efficient.


This is probably mostly useful for Platform developers, but also since we don't host a pubnet RPC instance, there are probably many folks running their own RPC as part of their infrastructure and the Lab experience is soooooo nice that it would be a huge productivity boon over writing raw JSON-RPC via curl.

What would you like to see?

The ability to specify URLs like http://localhost:8000 in the custom network section and have RPC queries work.

What alternatives are there?

Hosting the local RPC somewhere or writing the queries by hand :p

Shaptic avatar Aug 21 '24 20:08 Shaptic

Ask @janewang to show how to use the CLI's container start command for the localhost

janewang avatar Aug 26 '24 19:08 janewang