Skip to content

Commit

Permalink
adding user agent option
Browse files Browse the repository at this point in the history
  • Loading branch information
Tulsishah committed Apr 29, 2024
1 parent 78411ea commit c2239f3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/storage/storage_handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ func createHTTPClientHandle(ctx context.Context, clientConfig *storageutil.Stora

if clientConfig.SkipAuth {
clientOpts = append(clientOpts, option.WithoutAuthentication())
// We are adding the "userAgent" as an option. In cases where authentication needs to be skipped, we cannot create an
// HTTP transport, as this option allows us to bypass the authentication process.
clientOpts = append(clientOpts, option.WithUserAgent(clientConfig.UserAgent))
}

// Create client with JSON read flow, if EnableJasonRead flag is set.
Expand Down

0 comments on commit c2239f3

Please sign in to comment.