fix error

This commit is contained in:
邱博亞 2023-05-08 23:11:24 +08:00
parent c938e2ec98
commit 2d8efa35d1
1 changed files with 6 additions and 1 deletions

View File

@ -122,7 +122,12 @@ class Admin::RegisterApiController < ApplicationController
if success_flag
return response
else
response = Net::HTTP.post_form(URI("https://#{params[:site_domain]}/store/confirmation"),params_to_send) #if response.code == 301,use https to resend /store/confirmation
uri = URI("https://#{params[:site_domain]}/store/confirmation")
response = Net::HTTP.start(uri.host, uri.port,:use_ssl => uri.scheme == 'https',open_timeout: 30,read_timeout: 30,verify_mode: OpenSSL::SSL::VERIFY_NONE) do |http|
request = Net::HTTP::Post.new uri
request.set_form_data(params_to_send)
http.request request
end #if response.code == 301 or http not available,use https to resend /store/confirmation
return response
end
rescue => e