How to bypass SSL certificate verification in open-uri?

后端 未结 7 1108
無奈伤痛
無奈伤痛 2020-12-02 12:30

I try to access a file with open-uri over an https connection. Unfortunately somethings wrong with the certificate, I get a certificate verify failed error. I can\'

相关标签:
7条回答
  • 2020-12-02 13:00

    Found it out myself now: I used the dirty hack, which works fine for me.

    I had to put it into: yourrailsapp/initalizers/

    There I created a bypass_ssl_verification_for_open_uri.rb

    And put:

    OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
    
    0 讨论(0)
提交回复
热议问题