mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[storage|aws] fix hardcoded host in get_object_http(s)_url methods
This commit is contained in:
parent
53671afbc9
commit
f78afe9824
2 changed files with 4 additions and 4 deletions
|
@ -12,9 +12,9 @@ module Fog
|
|||
raise ArgumentError.new('object_name is required')
|
||||
end
|
||||
host, path = if bucket_name =~ /^(?:[a-z]|\d(?!\d{0,2}(?:\.\d{1,3}){3}$))(?:[a-z0-9]|\.(?![\.\-])|\-(?![\.])){1,61}[a-z0-9]$/
|
||||
["#{bucket_name}.s3.amazonaws.com", object_name]
|
||||
["#{bucket_name}.#{host}", object_name]
|
||||
else
|
||||
['s3.amazonaws.com', "#{bucket_name}/#{object_name}"]
|
||||
[@host, "#{bucket_name}/#{object_name}"]
|
||||
end
|
||||
http_url({
|
||||
:headers => {},
|
||||
|
|
|
@ -12,9 +12,9 @@ module Fog
|
|||
raise ArgumentError.new('object_name is required')
|
||||
end
|
||||
host, path = if bucket_name =~ /^(?:[a-z]|\d(?!\d{0,2}(?:\.\d{1,3}){3}$))(?:[a-z0-9]|\.(?![\.\-])|\-(?![\.])){1,61}[a-z0-9]$/
|
||||
["#{bucket_name}.s3.amazonaws.com", object_name]
|
||||
["#{bucket_name}.#{@host}", object_name]
|
||||
else
|
||||
['s3.amazonaws.com', "#{bucket_name}/#{object_name}"]
|
||||
[@host, "#{bucket_name}/#{object_name}"]
|
||||
end
|
||||
https_url({
|
||||
:headers => {},
|
||||
|
|
Loading…
Reference in a new issue