forked from TrueCloudLab/distribution
fix: don't override storage driver useragent if it's set (#4195)
This commit is contained in:
commit
35bda96521
1 changed files with 3 additions and 1 deletions
|
@ -113,7 +113,9 @@ func NewApp(ctx context.Context, config *configuration.Configuration) *App {
|
||||||
if storageParams == nil {
|
if storageParams == nil {
|
||||||
storageParams = make(configuration.Parameters)
|
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
|
var err error
|
||||||
app.driver, err = factory.Create(app, config.Storage.Type(), storageParams)
|
app.driver, err = factory.Create(app, config.Storage.Type(), storageParams)
|
||||||
|
|
Loading…
Reference in a new issue