I'm trying to access a contract on the completium-cli sandbox within my dapp running on a local vite server. Ideally I would set up my dev environment so I can test deploy to the sandbox within the dapp, interact with contracts in the sandbox etc while developing.
I'm not sure that the completium sandbox is meant to be used this way. If not, what should I use instead?
If it is meant to be used this way, how can I set up the sandbox so that CORS is disabled, and I can make server to server requests without getting CORS errors?
I am looking for something like this I can use with completium-cli:
How to make a tezos node set CORS headers
Otherwise I will attempt to set up my own sandbox or simply use ghostnet- but any suggestions for the best tools to get a sandbox running are appreciated
Thanks!
My settings:
endpoint: 'http://localhost:20000/',
network: NetworkType.CUSTOM,
contract: 'KT1AngU9xZzkKXxc3Ln1MkCweZXtGGroJbPu',
Completium-cli is initiated and works fine with ghostnet and main net if I change the endpoint and network above.
Console error:
Access to fetch at 'http://localhost:20000/chains/main/blocks/head/context/contracts/KT1AngU9xZzkKXxc3Ln1MkCweZXtGGroJbPu' 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. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.