Set ssl verify to none.

This commit is contained in:
BoHung Chiu 2022-05-19 15:53:11 +08:00
parent 5240e84160
commit f8fcefa0c1
1 changed files with 2 additions and 0 deletions

View File

@ -109,6 +109,7 @@ class SiteFeed
http_req = Net::HTTP.new(uri.host, uri.port) http_req = Net::HTTP.new(uri.host, uri.port)
if self.remote_site_url.include?('https') if self.remote_site_url.include?('https')
http_req.use_ssl = true http_req.use_ssl = true
http_req.verify_mode = OpenSSL::SSL::VERIFY_NONE
end end
http_req.open_timeout = 10 http_req.open_timeout = 10
request = Net::HTTP::Post.new("/xhr/#{self.channel_key.pluralize}/feed_add_remote/#{self.feed_uid}", 'Content-Type' => 'application/json') request = Net::HTTP::Post.new("/xhr/#{self.channel_key.pluralize}/feed_add_remote/#{self.feed_uid}", 'Content-Type' => 'application/json')
@ -128,6 +129,7 @@ class SiteFeed
http_req = Net::HTTP.new(uri.host, uri.port) http_req = Net::HTTP.new(uri.host, uri.port)
if self.remote_site_url.include?('https') if self.remote_site_url.include?('https')
http_req.use_ssl = true http_req.use_ssl = true
http_req.verify_mode = OpenSSL::SSL::VERIFY_NONE
end end
http_req.open_timeout = 10 http_req.open_timeout = 10
request = Net::HTTP::Post.new("/xhr/#{self.channel_key.pluralize}/feed_remove_remote/#{self.feed_uid}", 'Content-Type' => 'application/json') request = Net::HTTP::Post.new("/xhr/#{self.channel_key.pluralize}/feed_remove_remote/#{self.feed_uid}", 'Content-Type' => 'application/json')