1
0
Fork 0
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:
Zachary Danger Campbell 2011-12-30 13:12:09 -06:00
parent be7017e79f
commit 49cde23541

View file

@ -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