Skip to content

Commit

Permalink
Merge pull request fog#683 from zacharydanger/master
Browse files Browse the repository at this point in the history
Fixes the rackspace_cdn_ssl public_url method
  • Loading branch information
Wesley Beary committed Dec 30, 2011
2 parents be7017e + 49cde23 commit f07e594
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/fog/rackspace/models/storage/directory.rb
Expand Up @@ -58,7 +58,11 @@ def save

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
Expand Down

0 comments on commit f07e594

Please sign in to comment.