Add request IP to get_direct_download_url method
This commit is contained in:
parent
ad61df66c5
commit
56fbbcf7cf
8 changed files with 13 additions and 11 deletions
|
@ -6,6 +6,7 @@ from cnr.models.channel_base import ChannelBase
|
|||
from cnr.models.db_base import CnrDB
|
||||
from cnr.models.package_base import PackageBase, manifest_media_type
|
||||
|
||||
from flask import request
|
||||
from app import storage
|
||||
from endpoints.appr.models_oci import model
|
||||
|
||||
|
@ -36,7 +37,7 @@ class Blob(BlobBase):
|
|||
locations = model.get_blob_locations(digest)
|
||||
if not locations:
|
||||
raise_package_not_found(package_name, digest)
|
||||
return storage.get_direct_download_url(locations, blobpath)
|
||||
return storage.get_direct_download_url(locations, blobpath, request.remote_addr)
|
||||
|
||||
|
||||
class Channel(ChannelBase):
|
||||
|
|
Reference in a new issue