Skip to content

Commit

Permalink
fix: don't override storage driver useragent if it's set (#4195)
Browse files Browse the repository at this point in the history
  • Loading branch information
milosgajdos committed Dec 18, 2023
2 parents dfeaad7 + 2f98b77 commit 35bda96
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion registry/handlers/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ func NewApp(ctx context.Context, config *configuration.Configuration) *App {
if storageParams == nil {
storageParams = make(configuration.Parameters)
}
storageParams["useragent"] = fmt.Sprintf("distribution/%s %s", version.Version, runtime.Version())
if storageParams["useragent"] == "" {
storageParams["useragent"] = fmt.Sprintf("distribution/%s %s", version.Version, runtime.Version())
}

var err error
app.driver, err = factory.Create(app, config.Storage.Type(), storageParams)
Expand Down

0 comments on commit 35bda96

Please sign in to comment.