add address for listening

This commit is contained in:
Todd Gruben 2020-06-02 15:39:28 -05:00
parent 31c5e7363d
commit fdaae31c2c

View file

@ -274,6 +274,15 @@ func (m *Command) SetupServer() error {
grpcURI.SetPort(uint16(m.grpcLn.Addr().(*net.TCPAddr).Port))
}
if grpcURI.Scheme == "http" {
grpcURI.Scheme = "grpc"
}
// discover the address if not specified
if grpcURI.Host == "0.0.0.0" {
grpcURI.Host = outboundIP().String()
}
// Setup TLS
if uri.Scheme == "https" {
m.tlsConfig, err = GetTLSConfig(&m.Config.TLS, m.logger.Logger())