I'm running a Tezos network locally using babylonnet.sh. Works fine, can query for example ./babylonnet.sh client list known addresses. Also works in browser for example

When I try and run a local server, and connect I get a cors error:

Failed to load http://localhost:8732/chains/main/blocks/head/context/contracts/tz1ZQu5ZwCBP6QeTDwkrUHiUBzHtXi9gFqGF/balance
: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'http://localhost:8000' is therefore not allowed access.

I can't see how to set the cors using babylonnet.sh docker

1 Answer 1


The babylonnet.sh script accepts node options. You can inspect the node options via tezos-node run --help. The option you're looking for is:

--cors-origin=ORIGIN: CORS origin allowed by the RPC server via Access-Control-Allow-Origin; may be used multiple times

  • Thanks! I got it working using this: ./babylonnet.sh start --rpc-port --cors-origin=http://localhost:8000 --cors-origin=node:8732 --cors-origin=localhost:8732. Just adding localhost:8000 didn't work because some of the containers were using node:8732. But great stuff, I can start building now Feb 3, 2020 at 13:21
  • Also, I ran --help and could't find reference to cors. I can't find a reference on the docs too. Am I missing something? If it is missing it might be worth doing a pr. I'll look into that if so Feb 3, 2020 at 13:22
  • I'm guessing you're looking in the script's help, but this is located in the help of tezos-node config. I think with the script you can use ./babylonnet.sh shell tezos-node config --help to access this. Feb 4, 2020 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.