#504·dragonfly

SSL verification mode option

Author: annikoffCreated Oct 22, 2019Updated Oct 22, 2019

Is it possible to add an option ssl_verify_mode to Dragonfly.app.configure in order to use it here https://github.com/markevans/dragonfly/blob/master/lib/dragonfly/job/fetch_url.rb#L67-L80?

diff
def get(url)
  url = parse_url(url)

  http = Net::HTTP.new(url.host, url.port)
  http.use_ssl = true if url.scheme == 'https'
+ http.verify_mode = app.ssl_verify_mode unless app.ssl_verify_mode.nil?

  request = Net::HTTP::Get.new(url.request_uri)

  if url.user || url.password
    request.basic_auth(url.user, url.password)
  end

  http.request(request)
end