lib/fog/storage/models/rackspace/directory.rb in fog-0.7.1 vs lib/fog/storage/models/rackspace/directory.rb in fog-0.7.2
- old
+ new
@@ -36,11 +36,17 @@
def public_url
requires :key
@public_url ||= begin
begin response = connection.cdn.head_container(key)
- response.headers['X-CDN-Enabled'] == 'True' && response.headers['X-CDN-URI']
+ if response.headers['X-CDN-Enabled'] == 'True'
+ if connection.rackspace_cdn_ssl == true
+ response.headers['X-CDN-SSL-URI']
+ else
+ response.headers['X-CDN-URI']
+ end
+ end
rescue Fog::Service::NotFound
nil
end
end
end
@@ -54,10 +60,10 @@
connection.cdn.put_container(key, 'X-CDN-Enabled' => 'False')
@public_url = nil
end
true
end
-
+
end
end
end
end