Using TLS in grpc-gateway
By default DialOption{grpc.WithInsecure()}
is used in example. And as docs mention you just need to replace WithInsecure
with transport creds.
//opts := []grpc.DialOption{grpc.WithInsecure()}
creds, _ := credentials.NewClientTLSFromFile("tls.crt", "")
opts := []grpc.DialOption{grpc.WithTransportCredentials(creds)}