mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Fix intial public_url when saving using rackspace_cdn_ssl = true
This commit is contained in:
parent
be7017e79f
commit
49cde23541
1 changed files with 5 additions and 1 deletions
|
@ -58,7 +58,11 @@ module Fog
|
|||
|
||||
if @connection.cdn && @public
|
||||
# if public and CDN connection then update cdn to public
|
||||
@public_url = connection.cdn.put_container(key, 'X-CDN-Enabled' => 'True').headers['X-CDN-URI']
|
||||
uri_header = 'X-CDN-URI'
|
||||
if connection.rackspace_cdn_ssl == true
|
||||
uri_header = 'X-CDN-SSL-URI'
|
||||
end
|
||||
@public_url = connection.cdn.put_container(key, 'X-CDN-Enabled' => 'True').headers[uri_header]
|
||||
elsif @connection.cdn && !@public
|
||||
connection.cdn.put_container(key, 'X-CDN-Enabled' => 'False')
|
||||
@public_url = nil
|
||||
|
|
Loading…
Add table
Reference in a new issue