From bf5273e1762561bb395b93fad410e224241a8328 Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Mon, 24 Jun 2019 15:09:37 -0700 Subject: [PATCH] routes: fix headers --- pkg/api/routes.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/api/routes.go b/pkg/api/routes.go index 93660f61..6b13ffac 100644 --- a/pkg/api/routes.go +++ b/pkg/api/routes.go @@ -27,6 +27,7 @@ import ( ) const RoutePrefix = "/v2" +const DistAPIVersion = "Docker-Distribution-API-Version" const DistContentDigestKey = "Docker-Content-Digest" const BlobUploadUUID = "Blob-Upload-UUID" @@ -84,7 +85,8 @@ func (rh *RouteHandler) SetupRoutes() { // @Produce json // @Success 200 {string} string "ok" func (rh *RouteHandler) CheckVersionSupport(ginCtx *gin.Context) { - ginCtx.Data(http.StatusOK, "application/json; charset=utf-8", []byte{}) + ginCtx.Data(http.StatusOK, "application/json", []byte{}) + ginCtx.Header(DistAPIVersion, "registry/2.0") } type ImageTags struct {