Skip to content

Commit

Permalink
Using insecure credentials to allow plaintext communication
Browse files Browse the repository at this point in the history
  • Loading branch information
kpachhai committed Dec 2, 2024
1 parent f52de6a commit 6424865
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion grpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
pb "github.com/ava-labs/hypersdk/proto/pb/externalsubscriber"
"github.com/nuklai/nuklaivm/vm"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/reflection"
"google.golang.org/protobuf/types/known/emptypb"
)
Expand All @@ -41,7 +42,8 @@ func StartGRPCServer(db *sql.DB, port string) {
log.Fatalf("Failed to listen on port %s: %v", port, err)
}

grpcServer := grpc.NewServer()
// Use insecure credentials to allow plaintext communication
grpcServer := grpc.NewServer(grpc.Creds(insecure.NewCredentials()))

// Register your ExternalSubscriber service
pb.RegisterExternalSubscriberServer(grpcServer, &Server{db: db})
Expand Down

0 comments on commit 6424865

Please sign in to comment.