From 4f0813889c0a5f0628b57e3c2b1082f1b8008077 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Fri, 10 Mar 2023 11:59:50 +0800 Subject: [PATCH] log --- internal/api/route.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/api/route.go b/internal/api/route.go index 0e3b15baa..925679a92 100644 --- a/internal/api/route.go +++ b/internal/api/route.go @@ -7,6 +7,8 @@ import ( "OpenIM/pkg/common/prome" "OpenIM/pkg/discoveryregistry" "github.com/gin-gonic/gin" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" "io" "os" ) @@ -26,7 +28,7 @@ func NewGinRouter(zk discoveryregistry.SvcDiscoveryRegistry) *gin.Engine { r.Use(prome.PrometheusMiddleware) r.GET("/metrics", prome.PrometheusHandler()) } - zk.AddOption(mw.GrpcClient()) // 默认RPC中间件 + zk.AddOption(mw.GrpcClient(), grpc.WithTransportCredentials(insecure.NewCredentials())) // 默认RPC中间件 userRouterGroup := r.Group("/user") { u := NewUser(zk)