fix bugs causing ws bug

pull/1249/head
Minh Doan 5 years ago committed by Minh Doan
parent ff402dbf4a
commit c064ec696a
  1. 3
      node/rpc.go

@ -35,6 +35,7 @@ var (
httpModules = []string{"hmy", "net"}
httpVirtualHosts = []string{"*"}
httpTimeouts = rpc.DefaultHTTPTimeouts
httpOrigins = []string{"*"}
wsModules = []string{"net", "web3"}
wsOrigins = []string{"*"}
@ -56,7 +57,7 @@ func (node *Node) StartRPC(nodePort string) error {
port, _ := strconv.Atoi(nodePort)
httpEndpoint = fmt.Sprintf(":%v", port+rpcHTTPPortOffset)
if err := node.startHTTP(httpEndpoint, apis, httpModules, nil, httpVirtualHosts, httpTimeouts); err != nil {
if err := node.startHTTP(httpEndpoint, apis, httpModules, httpOrigins, httpVirtualHosts, httpTimeouts); err != nil {
return err
}

Loading…
Cancel
Save