mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-27 02:58:05 +01:00
enable policy checker for head manifest request (#15056)
As from docker v20, the containerd leverages the cache when to pull a manifest, that leads to the client doesn't send the get manifest request if the image exists in local. The content trust and vul checker are only valid for get manifest request, the PR is to enable the checkers on head manifest request to handle the containerd local cache scenario. Signed-off-by: Wang Yan <wangyan@vmware.com>
This commit is contained in:
parent
a2992327be
commit
ea35e7b9ec
@ -59,6 +59,8 @@ func RegisterRoutes() {
|
||||
Path("/*/manifests/:reference").
|
||||
Middleware(metric.InjectOpIDMiddleware(metric.ManifestOperationID)).
|
||||
Middleware(repoproxy.ManifestMiddleware()).
|
||||
Middleware(contenttrust.Middleware()).
|
||||
Middleware(vulnerable.Middleware()).
|
||||
HandlerFunc(getManifest)
|
||||
root.NewRoute().
|
||||
Method(http.MethodDelete).
|
||||
|
Loading…
Reference in New Issue
Block a user