diff --git a/internal/server/grpc_router.go b/internal/server/grpc_router.go index 09559ce8ac4226f2e63080d6e03cc9ca3436b1ed..359f0c86944f99dd0a5cf0b8d0615939d9fa65c0 100644 --- a/internal/server/grpc_router.go +++ b/internal/server/grpc_router.go @@ -40,6 +40,9 @@ import ( "net" ) +const keyClientName = "CLIENT_NAME-bin" +const clientName = "FachstellenServer" + type collaborationRouter struct { pb.UnimplementedCollaborationServiceServer } @@ -57,6 +60,7 @@ func (s *collaborationRouter) FindVorgang(ctx context.Context, in *pb.GrpcFindVo } func (s *collaborationRouter) handleRequest(ctx context.Context, handler func(pb.CollaborationServiceClient, context.Context) (interface{}, error)) (interface{}, error) { + ctx = metadata.AppendToOutgoingContext(ctx, keyClientName, clientName) md, ok := metadata.FromIncomingContext(ctx) if !ok { return nil, status.Error(codes.InvalidArgument, "unable to retrieve metadata")