mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-19 07:07:42 +01:00
rebase with latest source code
Signed-off-by: wang yan <wangyan@vmware.com>
This commit is contained in:
parent
c10467eb36
commit
446739f967
@ -5,9 +5,9 @@ import (
|
|||||||
"github.com/goharbor/harbor/src/controller/blob"
|
"github.com/goharbor/harbor/src/controller/blob"
|
||||||
"github.com/goharbor/harbor/src/lib"
|
"github.com/goharbor/harbor/src/lib"
|
||||||
"github.com/goharbor/harbor/src/lib/errors"
|
"github.com/goharbor/harbor/src/lib/errors"
|
||||||
|
lib_http "github.com/goharbor/harbor/src/lib/http"
|
||||||
"github.com/goharbor/harbor/src/lib/log"
|
"github.com/goharbor/harbor/src/lib/log"
|
||||||
blob_models "github.com/goharbor/harbor/src/pkg/blob/models"
|
blob_models "github.com/goharbor/harbor/src/pkg/blob/models"
|
||||||
serror "github.com/goharbor/harbor/src/server/error"
|
|
||||||
"github.com/goharbor/harbor/src/server/middleware"
|
"github.com/goharbor/harbor/src/server/middleware"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
@ -16,7 +16,7 @@ import (
|
|||||||
func HeadBlobMiddleware() func(http.Handler) http.Handler {
|
func HeadBlobMiddleware() func(http.Handler) http.Handler {
|
||||||
return middleware.New(func(rw http.ResponseWriter, req *http.Request, next http.Handler) {
|
return middleware.New(func(rw http.ResponseWriter, req *http.Request, next http.Handler) {
|
||||||
if err := handleHead(req); err != nil {
|
if err := handleHead(req); err != nil {
|
||||||
serror.SendError(rw, err)
|
lib_http.SendError(rw, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
next.ServeHTTP(rw, req)
|
next.ServeHTTP(rw, req)
|
||||||
|
Loading…
Reference in New Issue
Block a user