Skip to content

Commit

Permalink
Fix grpc user agent check
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 committed Oct 22, 2021
1 parent fdb0a60 commit 893546f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/storage/registry/static/static.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func userAgentIsAllowed(ua *ua.UserAgent, userAgents []string) bool {
return true
}
case "grpc":
if ua.Name == "grpc-go" {
if strings.HasPrefix(ua.Name, "grpc") {
return true
}
}
Expand All @@ -170,7 +170,6 @@ func (b *reg) FindProviders(ctx context.Context, ref *provider.Reference) ([]*re
if ref.ResourceId != nil {
if ref.ResourceId.StorageId != "" {
for prefix, rule := range b.c.Rules {

addr := getProviderAddr(ctx, rule)
r, err := regexp.Compile("^" + prefix + "$")
if err != nil {
Expand Down

0 comments on commit 893546f

Please sign in to comment.