mirror of
https://github.com/distribution/distribution
synced 2025-02-23 06:49:36 +01:00
fix: don't override storage driver useragent if it's set (#4195)
This commit is contained in:
commit
35bda96521
@ -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 New Issue
Block a user