When I use the cleos -u http://localhost:8888
, it will cause error, but if I use cleos -u http://127.0.0.1:8888
, that is ok.
What's the problem?
EOS.IO Stack Exchange is a question and answer site for users and developers of distributed applications built on top of the blockchain operating system, EOS.IO. It only takes a minute to sign up.
Sign up to join this communityWhen I use the cleos -u http://localhost:8888
, it will cause error, but if I use cleos -u http://127.0.0.1:8888
, that is ok.
What's the problem?
Should work, but I believe eosio::http_plugin
is not properly validating the case where host
is localhost
. Try:
$ cleos -u http://localhost:8888 --http-validate-host=false
or add http-validate-host=false
to the config.ini
for nodeos
.