Skip to content

Commit

Permalink
node: start RPC/WS interface on localhost by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Bas van Kervel committed May 6, 2016
1 parent 2d7d7ef commit d79f2f2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions node/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ func (api *PrivateAdminAPI) StartRPC(host *string, port *rpc.HexNumber, cors *st
}

if host == nil {
host = &api.node.httpHost
h := common.DefaultHTTPHost
if api.node.httpHost != "" {
h = api.node.httpHost
}
host = &h
}
if port == nil {
port = rpc.NewHexNumber(api.node.httpPort)
Expand Down Expand Up @@ -113,7 +117,11 @@ func (api *PrivateAdminAPI) StartWS(host *string, port *rpc.HexNumber, allowedOr
}

if host == nil {
host = &api.node.wsHost
h := common.DefaultWSHost
if api.node.wsHost != "" {
h = api.node.wsHost
}
host = &h
}
if port == nil {
port = rpc.NewHexNumber(api.node.wsPort)
Expand Down

0 comments on commit d79f2f2

Please sign in to comment.