Skip to content

Commit

Permalink
Fix user agent request header to have the correct agent version (#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhurley authored Nov 9, 2023
1 parent 747b121 commit ca800c1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func CreateGrpcClients(ctx context.Context, loadedConfig *config.Config) (client
}

func setDialOptions(loadedConfig *config.Config) []grpc.DialOption {
grpcDialOptions := []grpc.DialOption{grpc.WithUserAgent("nginx-agent/" + strings.TrimPrefix(version, "v"))}
grpcDialOptions := []grpc.DialOption{grpc.WithUserAgent("nginx-agent/" + strings.TrimPrefix(loadedConfig.Version, "v"))}
grpcDialOptions = append(grpcDialOptions, sdkGRPC.DefaultClientDialOptions...)
grpcDialOptions = append(grpcDialOptions, sdkGRPC.DataplaneConnectionDialOptions(loadedConfig.Server.Token, sdkGRPC.NewMessageMeta(uuid.NewString()))...)
return grpcDialOptions
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ca800c1

Please sign in to comment.