mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-02-10 18:05:10 +08:00
fix(ruby): replacing host when version download url is present. Fix Bug 73693
This commit is contained in:
@ -532,10 +532,7 @@ class HomeController < ApplicationController
|
|||||||
|
|
||||||
source_basename = body['fileName']
|
source_basename = body['fileName']
|
||||||
version = body['version']
|
version = body['version']
|
||||||
url = body['url'].sub(
|
url = body['url']
|
||||||
HomeController.config_manager.document_server_public_uri.to_s,
|
|
||||||
HomeController.config_manager.document_server_private_uri.to_s
|
|
||||||
)
|
|
||||||
user_id = body['userId']
|
user_id = body['userId']
|
||||||
|
|
||||||
source_extension = Pathname(source_basename).extname
|
source_extension = Pathname(source_basename).extname
|
||||||
@ -588,6 +585,10 @@ class HomeController < ApplicationController
|
|||||||
if url.nil?
|
if url.nil?
|
||||||
FileUtils.cp(recovery_file, source_file)
|
FileUtils.cp(recovery_file, source_file)
|
||||||
else
|
else
|
||||||
|
url = url.sub(
|
||||||
|
HomeController.config_manager.document_server_public_uri.to_s,
|
||||||
|
HomeController.config_manager.document_server_private_uri.to_s
|
||||||
|
)
|
||||||
uri = URI.parse(url)
|
uri = URI.parse(url)
|
||||||
http = Net::HTTP.new(uri.host, uri.port)
|
http = Net::HTTP.new(uri.host, uri.port)
|
||||||
DocumentHelper.verify_ssl(url, http)
|
DocumentHelper.verify_ssl(url, http)
|
||||||
|
|||||||
Reference in New Issue
Block a user