zoukankan      html  css  js  c++  java
  • EOS wallet API 报HTTP 400错误

    服务器:192.168.8.144
    按照官方的docker方式运行的,因为keosd(钱包)开出来的API只容许本地访问,即:
    url --request POST --header 'Host: 0.0.0.0:5555' --url http://192.168.8.144:5555/v1/wallet/list_wallets是可以访问的,必须要指明Host: 0.0.0.0:5555

    远程如何访问?

    增加参数--http-alias

    我的docker启动参数

    CONTRACTS_DIR=/root/exchange/eos/contracts
    docker run --name eosio 
      --publish 7777:7777 
      --publish 192.168.8.144:5555:5555 
      --volume $CONTRACTS_DIR:$CONTRACTS_DIR 
      --detach 
      eosio/eos:v1.4.2 
      /bin/bash -c 
      "keosd --http-server-address=0.0.0.0:5555 --http-alias=192.168.8.144:5555 --access-control-allow-origin=localhost & exec nodeos -e -p eosio --plugin eosio::producer_plugin --plugin eosio::chain_api_plugin --plugin eosio::history_plugin --plugin eosio::history_api_plugin --plugin eosio::http_plugin -d /mnt/dev/data --config-dir /mnt/dev/config --http-server-address=0.0.0.0:7777 --access-control-allow-origin=* --contracts-console --http-validate-host=false --filter-on='*'"
    

    这样,远程也可以访问了,本地也不用显式指明Host了。

  • 相关阅读:
    远程控制.scrcpy&其他资料&我的游戏辅助方案
    虚拟机.第三方.droid4x(海马玩)
    私.微信
    私.Modbus测试_ZC03_rtu,ascii,tcp
    Modbus资料
    私.Modbus测试_ZC02_串口方式
    私.Modbus测试_ZC01_TCP方式
    私.01.serialport
    C# Type Basics
    NORFLASH驱动详细说明
  • 原文地址:https://www.cnblogs.com/cqvoip/p/9991100.html
Copyright © 2011-2022 走看看