Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/uploaders/object_storage/cdn.rb')
-rw-r--r--app/uploaders/object_storage/cdn.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/uploaders/object_storage/cdn.rb b/app/uploaders/object_storage/cdn.rb
index e49e2780147..8c9ee8682f4 100644
--- a/app/uploaders/object_storage/cdn.rb
+++ b/app/uploaders/object_storage/cdn.rb
@@ -12,9 +12,9 @@ module ObjectStorage
UrlResult = Struct.new(:url, :used_cdn)
- def cdn_enabled_url(project, ip_address)
- if Feature.enabled?(:ci_job_artifacts_cdn, project) && use_cdn?(ip_address)
- UrlResult.new(cdn_signed_url, true)
+ def cdn_enabled_url(ip_address, params = {})
+ if use_cdn?(ip_address)
+ UrlResult.new(cdn_signed_url(params), true)
else
UrlResult.new(url, false)
end
@@ -27,8 +27,8 @@ module ObjectStorage
cdn_provider.use_cdn?(request_ip)
end
- def cdn_signed_url
- cdn_provider&.signed_url(path)
+ def cdn_signed_url(params = {})
+ cdn_provider&.signed_url(path, params: params)
end
private