mirror of
https://github.com/fog/fog-aws.git
synced 2022-11-09 13:50:52 -05:00
Merge pull request #507 from blake-education/fix/cname-signed-url
Avoid using bucket_name.host if host is overriden.
This commit is contained in:
commit
d84473bbd1
1 changed files with 6 additions and 2 deletions
|
@ -43,7 +43,7 @@ module Fog
|
|||
]
|
||||
|
||||
requires :aws_access_key_id, :aws_secret_access_key
|
||||
recognizes :endpoint, :region, :host, :port, :scheme, :persistent, :use_iam_profile, :aws_session_token, :aws_credentials_expire_at, :path_style, :acceleration, :instrumentor, :instrumentor_name, :aws_signature_version
|
||||
recognizes :endpoint, :region, :host, :port, :scheme, :persistent, :use_iam_profile, :aws_session_token, :aws_credentials_expire_at, :path_style, :acceleration, :instrumentor, :instrumentor_name, :aws_signature_version, :virtual_host, :cname
|
||||
|
||||
secrets :aws_secret_access_key, :hmac
|
||||
|
||||
|
@ -289,7 +289,11 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
if path_style
|
||||
# uses the bucket name as host if `virtual_host: true`, you can also
|
||||
# manually specify the cname if required.
|
||||
if params[:virtual_host]
|
||||
host = params.fetch(:cname, bucket_name)
|
||||
elsif path_style
|
||||
path = bucket_to_path bucket_name, path
|
||||
else
|
||||
host = [bucket_name, host].join('.')
|
||||
|
|
Loading…
Reference in a new issue