Change to return a proper manifest URL

This commit is contained in:
Joseph Schorr 2015-08-25 16:08:47 -04:00
parent d9973af1df
commit 9842857b89

View file

@ -7,7 +7,7 @@ import jwt.utils
import yaml
import json
from flask import make_response, request
from flask import make_response, request, url_for
from collections import namedtuple, OrderedDict
from jwkest.jws import SIGNER_ALGS
from jwkest.jwk import RSAKey
@ -280,7 +280,8 @@ def _write_manifest(namespace, repo_name, manifest):
response = make_response('OK', 202)
response.headers['Docker-Content-Digest'] = manifest_digest
response.headers['Location'] = 'https://fun.com'
response.headers['Location'] = url_for('v2.fetch_manifest_by_digest', namespace=namespace,
repo_name=repo_name, manifest_ref=manifest_digest)
return response