Commit 30476e39 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch '44126-setup-middleware-before-adapter' into 'master'

Eliminate Faraday warnings

Closes #44126

See merge request gitlab-org/gitlab-ce!17795
parents 0b849e8d 31b0097b
...@@ -52,6 +52,8 @@ module ContainerRegistry ...@@ -52,6 +52,8 @@ module ContainerRegistry
conn.request(:authorization, :bearer, options[:token].to_s) conn.request(:authorization, :bearer, options[:token].to_s)
end end
yield(conn) if block_given?
conn.adapter :net_http conn.adapter :net_http
end end
...@@ -80,8 +82,7 @@ module ContainerRegistry ...@@ -80,8 +82,7 @@ module ContainerRegistry
def faraday def faraday
@faraday ||= Faraday.new(@base_uri) do |conn| @faraday ||= Faraday.new(@base_uri) do |conn|
initialize_connection(conn, @options) initialize_connection(conn, @options, &method(:accept_manifest))
accept_manifest(conn)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment