add path check for multiplexer (#451)

This commit is contained in:
UUBulb
2024-10-23 12:55:10 +08:00
committed by GitHub
parent 6615505ab9
commit 1eaf70782a
2 changed files with 7 additions and 8 deletions
+1 -3
View File
@@ -1,8 +1,6 @@
package rpc
import (
"net/http"
"google.golang.org/grpc"
"github.com/naiba/nezha/model"
@@ -11,7 +9,7 @@ import (
"github.com/naiba/nezha/service/singleton"
)
func ServeRPC() http.Handler {
func ServeRPC() *grpc.Server {
server := grpc.NewServer()
rpcService.NezhaHandlerSingleton = rpcService.NewNezhaHandler()
pb.RegisterNezhaServiceServer(server, rpcService.NezhaHandlerSingleton)