node,utils: address review concerns

This commit is contained in:
Martin Holst Swende 2018-03-05 11:38:10 +01:00
parent 6a078b51f6
commit 5856850b6a
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0
2 changed files with 7 additions and 7 deletions

View file

@ -400,7 +400,7 @@ var (
RPCVirtualHostsFlag = cli.StringFlag{ RPCVirtualHostsFlag = cli.StringFlag{
Name: "rpcvhosts", Name: "rpcvhosts",
Usage: "Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard.", Usage: "Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard.",
Value: "localhost", Value: strings.Join(node.DefaultConfig.HTTPVirtualHosts, ","),
} }
RPCApiFlag = cli.StringFlag{ RPCApiFlag = cli.StringFlag{
Name: "rpcapi", Name: "rpcapi",

View file

@ -35,17 +35,17 @@ const (
// DefaultConfig contains reasonable default settings. // DefaultConfig contains reasonable default settings.
var DefaultConfig = Config{ var DefaultConfig = Config{
DataDir: DefaultDataDir(), DataDir: DefaultDataDir(),
HTTPPort: DefaultHTTPPort, HTTPPort: DefaultHTTPPort,
HTTPModules: []string{"net", "web3"}, HTTPModules: []string{"net", "web3"},
WSPort: DefaultWSPort, HTTPVirtualHosts: []string{"localhost"},
WSModules: []string{"net", "web3"}, WSPort: DefaultWSPort,
WSModules: []string{"net", "web3"},
P2P: p2p.Config{ P2P: p2p.Config{
ListenAddr: ":30303", ListenAddr: ":30303",
MaxPeers: 25, MaxPeers: 25,
NAT: nat.Any(), NAT: nat.Any(),
}, },
HTTPVirtualHosts: []string{"localhost"},
} }
// DefaultDataDir is the default data directory to use for the databases and other // DefaultDataDir is the default data directory to use for the databases and other