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