Add request IP to get_direct_download_url method

This commit is contained in:
Joseph Schorr 2017-09-25 17:14:28 -04:00
parent ad61df66c5
commit 56fbbcf7cf
8 changed files with 13 additions and 11 deletions

View file

@ -132,7 +132,7 @@ def get_image_layer(namespace, repository, image_id, headers):
abort(404, 'Image %(image_id)s not found', issue='unknown-image', image_id=image_id)
try:
logger.debug('Looking up the direct download URL for path: %s', path)
direct_download_url = store.get_direct_download_url(locations, path)
direct_download_url = store.get_direct_download_url(locations, path, request.remote_addr)
if direct_download_url:
logger.debug('Returning direct download URL')
resp = redirect(direct_download_url)