Merge pull request #416 from tgruben/fix-grpc-address

add address for listening
This commit is contained in:
tgruben 2020-06-02 16:25:53 -05:00 • committed by GitHub
commit 43195ae2dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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())