forked from TrueCloudLab/distribution
What if authConfig or factory is Null?
Signed-off-by: Steven Taylor <steven.taylor@me.com>
This commit is contained in:
parent
ad3d879929
commit
2bd5eb9d7c
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ func NewSession(authConfig *AuthConfig, factory *requestdecorator.RequestFactory
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if info.Standalone {
|
||||
if info.Standalone && authConfig != nil && factory != nil {
|
||||
logrus.Debugf("Endpoint %s is eligible for private registry. Enabling decorator.", r.indexEndpoint.String())
|
||||
dec := requestdecorator.NewAuthDecorator(authConfig.Username, authConfig.Password)
|
||||
factory.AddDecorator(dec)
|
||||
|
|
Loading…
Reference in a new issue