· 1 min read

Turn Off SSL Verification In Ruby

The following code will disable SSL verification when using Open SSL.

OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE

It is probably not a good idea to do this in production. But if you are just testing on your development machine it might come in handy.

You can add this to your Rails project in development environment like so...

# Add to config/application.rb
if Rails.env.development?
    OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
end

1 comment

  • hevih27927

    how to use this with webscket driver in ruby

Leave a comment