Add skip verify ssl when request.

This commit is contained in:
BoHung Chiu 2022-05-10 18:10:57 +08:00
parent 2ab00c040e
commit e0e388faa6
1 changed files with 4 additions and 0 deletions

View File

@ -343,6 +343,7 @@ class Admin::AnnouncementsController < OrbitAdminController
http_req = Net::HTTP.new(uri.host, uri.port) http_req = Net::HTTP.new(uri.host, uri.port)
if remote_url.include?('https') if remote_url.include?('https')
http_req.use_ssl = true http_req.use_ssl = true
http_req.verify_mode = OpenSSL::SSL::VERIFY_NONE
end end
response = http_request( http_req , request ) response = http_request( http_req , request )
end end
@ -451,6 +452,7 @@ class Admin::AnnouncementsController < OrbitAdminController
http_req = Net::HTTP.new(uri.host, uri.port) http_req = Net::HTTP.new(uri.host, uri.port)
if remote_url.include?('https') if remote_url.include?('https')
http_req.use_ssl = true http_req.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
end end
response = http_request( http_req , request ) response = http_request( http_req , request )
end end
@ -479,6 +481,7 @@ class Admin::AnnouncementsController < OrbitAdminController
http_req = Net::HTTP.new(uri.host, uri.port) http_req = Net::HTTP.new(uri.host, uri.port)
if remote_url.include?('https') if remote_url.include?('https')
http_req.use_ssl = true http_req.use_ssl = true
http_req.verify_mode = OpenSSL::SSL::VERIFY_NONE
end end
response = http_request( http_req , request ) response = http_request( http_req , request )
end end
@ -509,6 +512,7 @@ class Admin::AnnouncementsController < OrbitAdminController
http_req = Net::HTTP.new(uri.host, uri.port) http_req = Net::HTTP.new(uri.host, uri.port)
if remote_url.include?('https') if remote_url.include?('https')
http_req.use_ssl = true http_req.use_ssl = true
http_req.verify_mode = OpenSSL::SSL::VERIFY_NONE
end end
response = http_request( http_req , request ) response = http_request( http_req , request )
end end