gRPC hostname

22 views
Skip to first unread message

XCompiler

unread,
Jun 3, 2020, 1:12:31 AM6/3/20
to grpc.io
Hi,

I need help. 

I was trying to add certificate to grpc service and to remove the default localhost when you access the service.

gRpc service is written in c#, and i was trying to use this type of cert *.bml.com see code below

webBuilder.ConfigureKestrel(server =>

                    {

                        server.Listen(IPAddress.Loopback, 5001, listenOptions =>

                        {

                            listenOptions.Protocols = HttpProtocols.Http2;

                            listenOptions.UseHttps("bml.pfx""testabc");

                        });

                    });


even with the certificate configured, when i access the service its still https://localhost:5001, and i want to change it to https://apiservice.bml.com:5001



thanks.

Wesley Peng

unread,
Jun 3, 2020, 1:14:37 AM6/3/20
to grp...@googlegroups.com
XCompiler wrote:
>                         server.Listen(IPAddress.Loopback, 5001,
> listenOptions =>

You have server listened on lookback interface, please change it to a
regular IP address.

regards.
Reply all
Reply to author
Forward
0 new messages