fix: don't override storage driver useragent if it's set
Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This commit is contained in:
parent
dfeaad7e3b
commit
2f98b77171
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 {
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue