lib/httpx/plugins/proxy.rb in httpx-0.19.6 vs lib/httpx/plugins/proxy.rb in httpx-0.19.7
- old
+ new
@@ -79,10 +79,14 @@
uri = URI(uri).find_proxy
uris << uri if uri
end
uris
end
- { uri: @_proxy_uris.first } unless @_proxy_uris.empty?
+ return if @_proxy_uris.empty?
+
+ proxy_opts = { uri: @_proxy_uris.first }
+ proxy_opts = options.proxy.merge(proxy_opts) if options.proxy
+ proxy_opts
end
def find_connection(request, connections, options)
return super unless options.respond_to?(:proxy)