Skip to content

Commit

Permalink
feat: disable private http by default
Browse files Browse the repository at this point in the history
  • Loading branch information
moraleinside committed Nov 30, 2022
1 parent b493ef3 commit 3c1cbfc
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion common/default_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
const (
DefaultHTTPHost = "localhost" // Default host interface for the HTTP RPC server
DefaultHTTPPort = 48132 // Default TCP port for the HTTP RPC server
DefaultPrivateHTTPPort = 48133// Default TCP port for the private HTTP RPC server
DefaultWSHost = "localhost" // Default host interface for the websocket RPC server
DefaultWSPort = 31420 // Default TCP port for the websocket RPC server
DefaultP2PPort = 8483
Expand Down
1 change: 0 additions & 1 deletion node/config/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ var DefaultNodeConfig = Config{
KeyStoreDir: DefaultDataDir(),
HttpPort: common.DefaultHTTPPort,
WSPort: common.DefaultWSPort,
PrivateHttpPort: common.DefaultPrivateHTTPPort,

LogLevel: "info",
HTTPCors: []string{"*"},
Expand Down
2 changes: 1 addition & 1 deletion rpc/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func StartHTTPEndpoint(endpoint string, privateEndpoint string, apis []API, modu

go NewHTTPServer(cors, vhosts, timeouts, handler).Serve(listener)

if privateBind {
if privateBind && len(privateEndpoint) > 0 {
if privateListener, err = net.Listen("tcp", privateEndpoint); err != nil {
return nil, nil, nil, nil, err
}
Expand Down

0 comments on commit 3c1cbfc

Please sign in to comment.