eos icon indicating copy to clipboard operation
eos copied to clipboard

when i run "cleos --wallet-url http://localhost:8899"--Error 3200006: invalid http request, i already set "http-validate-host = 0"

Open amActiveHello opened this issue 8 years ago • 3 comments

1、when i run cleos --wallet-url http://localhost:8899 set contract eosio build/contracts/eosio.bios image 2、but when i change localhost to 127.0.0.1 ,then i run "cleos --wallet-url http://127.0.0.1:8899 set contract eosio build/contracts/eosio.bios", it's ok: image 3、in "~/.local/share/eosio/nodeos/config/config.ini " file "http-validate-host = 0": image 4、when i ping localhost ,it's ip is 127.0.0.1 image

amActiveHello avatar Aug 15 '18 08:08 amActiveHello

This is correct behavior, keosd does not read the configuration for nodeos that you have mentioned. As keosd protects sensitive keys it requires the HTTP Host headers to be exactly validated. you will need to replicate the http-validate-host setting in the config file for keosd

If you are not running an installed build this is probably located in ${HOME}/eosio-wallet/ otherwise it is part of your installation

the reason (2) works is that the IP address is automatically a whitelisted host if that is the exact local IP you are connecting to.

wanderingbort avatar Aug 15 '18 11:08 wanderingbort

thabk you, now it's ok.but when i run "cleos --url http://localhost:8889 get info", it produces the same error: image I already set "http-validate-host = 0" in nodeo's config file (.local/share/eosio/nodeos/config/config.ini): image

amActiveHello avatar Aug 16 '18 01:08 amActiveHello

Be sure you have restarted nodeos since making the change to its configuration file. It does not reread the config file while running.

jgiszczak avatar Aug 17 '18 20:08 jgiszczak