Browse Source

fix: 修正 https 加入 OpenSSL::SSL::VERIFY_PEER

anxgang 3 years ago
parent
commit
25adde33df
2 changed files with 4 additions and 1 deletions
  1. 3 0
      lib/ebaytr.rb
  2. 1 1
      lib/ebaytr/version.rb

+ 3 - 0
lib/ebaytr.rb

@@ -28,6 +28,9 @@ module Ebaytr
     end
     url = URI.parse(@@url)
     https = Net::HTTP.new(url.host,url.port)
+    https.open_timeout = 60
+    https.read_timeout = 60
+    https.verify_mode = OpenSSL::SSL::VERIFY_PEER
     https.use_ssl = true
     req = Net::HTTP::Post.new(url.path)
 

+ 1 - 1
lib/ebaytr/version.rb

@@ -1,3 +1,3 @@
 module Ebaytr
-  VERSION = "1.3.6"
+  VERSION = "1.3.7"
 end