Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTPHost would not be overwritten by --http.addr if config.toml being used #994

Closed
jasonyic opened this issue Jul 15, 2022 · 2 comments
Closed
Assignees

Comments

@jasonyic
Copy link
Contributor

jasonyic commented Jul 15, 2022

System information

Geth version: v1.1.11
OS & Version: Linux

Expected behaviour

config.toml:

[Node]
DataDir = "node"
InsecureUnlockAllowed = false
NoUSB = true
IPCPath = "geth.ipc"
HTTPHost = "127.0.0.1"

geth --config config.toml --http.addr 0.0.0.0 --http.port 8545 would expect RPC listening on 0.0.0.0

Actual behaviour

RPC is listening on 127.0.0.1, still using the value set in config.toml

INFO [07-15|05:53:19.192] HTTP server started                      endpoint=127.0.0.1:8545 prefix= cors= vhosts=*

Backtrace

HTTPHost is set by config.toml and would not be overwritten by --http.addr

	if ctx.GlobalBool(HTTPEnabledFlag.Name) && cfg.HTTPHost == "" {
		cfg.HTTPHost = "127.0.0.1"
		if ctx.GlobalIsSet(HTTPListenAddrFlag.Name) {
			cfg.HTTPHost = ctx.GlobalString(HTTPListenAddrFlag.Name)
		}
	}

Suggest/Fix

default HTTPHost in config.toml in each release should be kept as empty string ""

@yutianwu
Copy link
Contributor

Hi, this issue will be fixed in #999, and it should be included in the next release.

@yutianwu yutianwu self-assigned this Jul 19, 2022
@jasonyic
Copy link
Contributor Author

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants