Michael Yang 1 anno fa
parent
commit
e6881cabd0
3 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 1 1
      server/auth.go
  2. 1 1
      server/images.go
  3. 1 1
      server/upload.go

+ 1 - 1
server/auth.go

@@ -71,7 +71,7 @@ func (r AuthRedirect) URL() (*url.URL, error) {
 	return redirectURL, nil
 	return redirectURL, nil
 }
 }
 
 
-func getAuthToken(ctx context.Context, redirData AuthRedirect, regOpts *RegistryOptions) (string, error) {
+func getAuthToken(ctx context.Context, redirData AuthRedirect) (string, error) {
 	redirectURL, err := redirData.URL()
 	redirectURL, err := redirData.URL()
 	if err != nil {
 	if err != nil {
 		return "", err
 		return "", err

+ 1 - 1
server/images.go

@@ -1394,7 +1394,7 @@ func makeRequestWithRetry(ctx context.Context, method string, requestURL *url.UR
 		case resp.StatusCode == http.StatusUnauthorized:
 		case resp.StatusCode == http.StatusUnauthorized:
 			auth := resp.Header.Get("www-authenticate")
 			auth := resp.Header.Get("www-authenticate")
 			authRedir := ParseAuthRedirectString(auth)
 			authRedir := ParseAuthRedirectString(auth)
-			token, err := getAuthToken(ctx, authRedir, regOpts)
+			token, err := getAuthToken(ctx, authRedir)
 			if err != nil {
 			if err != nil {
 				return nil, err
 				return nil, err
 			}
 			}

+ 1 - 1
server/upload.go

@@ -125,7 +125,7 @@ func uploadBlobChunked(ctx context.Context, requestURL *url.URL, layer *Layer, r
 
 
 				auth := resp.Header.Get("www-authenticate")
 				auth := resp.Header.Get("www-authenticate")
 				authRedir := ParseAuthRedirectString(auth)
 				authRedir := ParseAuthRedirectString(auth)
-				token, err := getAuthToken(ctx, authRedir, regOpts)
+				token, err := getAuthToken(ctx, authRedir)
 				if err != nil {
 				if err != nil {
 					return err
 					return err
 				}
 				}