summaryrefslogtreecommitdiff
path: root/lib/gitlab/http_connection_adapter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/http_connection_adapter.rb')
-rw-r--r--lib/gitlab/http_connection_adapter.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/gitlab/http_connection_adapter.rb b/lib/gitlab/http_connection_adapter.rb
index dfecf3a669e..002708beb3c 100644
--- a/lib/gitlab/http_connection_adapter.rb
+++ b/lib/gitlab/http_connection_adapter.rb
@@ -29,7 +29,7 @@ module Gitlab
http = super
http.hostname_override = hostname if hostname
- if Feature.enabled?(:header_read_timeout_buffered_io)
+ if Feature.enabled?(:header_read_timeout_buffered_io, default_enabled: :yaml)
gitlab_http = Gitlab::NetHttpAdapter.new(http.address, http.port)
http.instance_variables.each do |variable|
@@ -47,6 +47,7 @@ module Gitlab
def validate_url!(url)
Gitlab::UrlBlocker.validate!(url, allow_local_network: allow_local_requests?,
allow_localhost: allow_local_requests?,
+ allow_object_storage: allow_object_storage?,
dns_rebind_protection: dns_rebind_protection?)
rescue Gitlab::UrlBlocker::BlockedUrlError => e
raise Gitlab::HTTP::BlockedUrlError, "URL '#{url}' is blocked: #{e.message}"
@@ -56,6 +57,10 @@ module Gitlab
options.fetch(:allow_local_requests, allow_settings_local_requests?)
end
+ def allow_object_storage?
+ options.fetch(:allow_object_storage, false)
+ end
+
def dns_rebind_protection?
return false if Gitlab.http_proxy_env?