Skip to content

Commit 3d331c0

Browse files
committed
Change the 429
1 parent 6e21fb9 commit 3d331c0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crproxy_manifest.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ func (c *CRProxy) cacheManifestResponse(rw http.ResponseWriter, r *http.Request,
7373
}
7474
}
7575

76+
if resp.StatusCode == http.StatusTooManyRequests {
77+
c.errorResponse(rw, r, fmt.Errorf("origin response 429"))
78+
return
79+
}
80+
7681
resp.Header.Del("Docker-Ratelimit-Source")
7782

7883
header := rw.Header()

0 commit comments

Comments
 (0)