You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After bumping valvat from 1.1.5 to 1.4.0, we cannot set a proxy for the Net::HTTP request. My suggestion is to add proxy option to http option to set proxy for the http client.
class Valvat
class Lookup
class Base
private
def send_request(uri)
proxy_options = @options[:http].delete(:proxy)
if proxy_options
proxy_args = proxy_options.values_at(:p_addr, :p_port, :p_user, :p_pass).compact
request = build_request(uri)
Net::HTTP.start(uri.host, uri.port, *proxy_args, options_for(uri)) do |http|
http.request(request)
end
else
super
end
end
end
end
end
The text was updated successfully, but these errors were encountered:
After bumping valvat from 1.1.5 to 1.4.0, we cannot set a proxy for the Net::HTTP request. My suggestion is to add
proxy
option tohttp
option to set proxy for the http client.Fixed with patch and options
The text was updated successfully, but these errors were encountered: