diff --git a/endpoints/v2/manifest.py b/endpoints/v2/manifest.py index 64affc189..c5ceafeac 100644 --- a/endpoints/v2/manifest.py +++ b/endpoints/v2/manifest.py @@ -228,7 +228,9 @@ def fetch_manifest_by_tagname(namespace, repo_name, manifest_ref): if repo is not None: track_and_log('pull_repo', repo) - return make_response(manifest.json_data, 200) + response = make_response(manifest.json_data, 200) + response.headers['Docker-Content-Digest'] = manifest.digest + return response @v2_bp.route(MANIFEST_DIGEST_ROUTE, methods=['GET']) @@ -246,7 +248,9 @@ def fetch_manifest_by_digest(namespace, repo_name, manifest_ref): if repo is not None: track_and_log('pull_repo', repo) - return make_response(manifest.json_data, 200) + response = make_response(manifest.json_data, 200) + response.headers['Docker-Content-Digest'] = manifest.digest + return response @v2_bp.route(MANIFEST_TAGNAME_ROUTE, methods=['PUT'])