Skip to content

Instantly share code, notes, and snippets.

@doubleotoo
Created October 23, 2012 22:33
Show Gist options
  • Save doubleotoo/3942158 to your computer and use it in GitHub Desktop.
Save doubleotoo/3942158 to your computer and use it in GitHub Desktop.
Faraday: Disable SSL verification
# See project page: https://github.com/technoweenie/faraday
#
# This patch applies to:
#
# faraday (0.8.4)
# faraday_middleware (0.8.8)
require 'faraday'
module Faraday
class Adapter
class NetHttp < Faraday::Adapter
# See original definition here:
# https://github.com/technoweenie/faraday/blob/412844ac1d90faef1bba5eed25091279358bdf99/lib/faraday/adapter/net_http.rb#L107
def ssl_verify_mode(ssl)
OpenSSL::SSL::VERIFY_NONE
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment