Skip to content

Commit

Permalink
Moved useragent interceptor before log
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 committed Nov 9, 2021
1 parent 01a37b6 commit b0fd276
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/rgrpc/rgrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ func (s *Server) getInterceptors(unprotected []string) ([]grpc.ServerOption, err
unaryInterceptors = append([]grpc.UnaryServerInterceptor{
appctx.NewUnary(s.log),
token.NewUnary(),
useragent.NewUnary(),
log.NewUnary(),
recovery.NewUnary(),
useragent.NewUnary(),
}, unaryInterceptors...)
unaryChain := grpc_middleware.ChainUnaryServer(unaryInterceptors...)

Expand Down Expand Up @@ -333,9 +333,9 @@ func (s *Server) getInterceptors(unprotected []string) ([]grpc.ServerOption, err
authStream,
appctx.NewStream(s.log),
token.NewStream(),
useragent.NewStream(),
log.NewStream(),
recovery.NewStream(),
useragent.NewStream(),
}, streamInterceptors...)
streamChain := grpc_middleware.ChainStreamServer(streamInterceptors...)

Expand Down

0 comments on commit b0fd276

Please sign in to comment.