when i run "cleos --wallet-url http://localhost:8899"--Error 3200006: invalid http request, i already set "http-validate-host = 0"
1、when i run cleos --wallet-url http://localhost:8899 set contract eosio build/contracts/eosio.bios
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:
3、in "~/.local/share/eosio/nodeos/config/config.ini " file "http-validate-host = 0":
4、when i ping localhost ,it's ip is 127.0.0.1

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

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