mirror of https://github.com/poanetwork/gecko.git
open HTTP port iff HTTP server not listening on localhost
This commit is contained in:
parent
38f7e23647
commit
c7356a581d
|
@ -71,8 +71,10 @@ func main() {
|
|||
mapper := nat.NewDefaultMapper(log, Config.Nat, nat.TCP, "gecko")
|
||||
defer mapper.UnmapAllPorts()
|
||||
|
||||
mapper.MapPort(Config.StakingIP.Port, Config.StakingIP.Port)
|
||||
mapper.MapPort(Config.HTTPPort, Config.HTTPPort)
|
||||
mapper.MapPort(Config.StakingIP.Port, Config.StakingIP.Port) // Open staking port
|
||||
if Config.HTTPHost != "127.0.0.1" && Config.HTTPHost != "localhost" { // Open HTTP port iff HTTP server not listening on localhost
|
||||
mapper.MapPort(Config.HTTPPort, Config.HTTPPort)
|
||||
}
|
||||
|
||||
node := node.Node{}
|
||||
|
||||
|
|
Loading…
Reference in New Issue