This commit is contained in:
chiu 2020-12-27 22:36:51 +08:00
parent af8e3bc214
commit 6343fb00d3
1 changed files with 5 additions and 2 deletions

View File

@ -102,7 +102,10 @@ class Admin::FeedsController < OrbitAdminController
begin begin
res = Timeout.timeout(10){Net::HTTP.get_response(uri).body} res = Timeout.timeout(10){Net::HTTP.get_response(uri).body}
rescue rescue
res = nil http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true if (uri.scheme == "https")
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
res = http.get(uri.request_uri).body rescue nil
puts uri.to_s puts uri.to_s
puts uri.hostname puts uri.hostname
end end