lib/appsignal/transmitter.rb in appsignal-0.11.13 vs lib/appsignal/transmitter.rb in appsignal-0.11.14.beta.1
- old
+ new
@@ -60,10 +60,16 @@
request.body = payload.body
end
end
def http_client
- Net::HTTP.new(uri.host, uri.port, proxy_addr, proxy_port).tap do |http|
+ client = if config[:http_proxy]
+ Net::HTTP.new(uri.host, uri.port, proxy_addr, proxy_port)
+ else
+ Net::HTTP.new(uri.host, uri.port)
+ end
+
+ client.tap do |http|
if uri.scheme == 'https'
http.use_ssl = true
http.ssl_version = :TLSv1
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
http.ca_file = CA_FILE_PATH