1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Merge pull request #1107 from zacharydanger/rackspace-cdn-headers

Update public_url to handle new header casings from Rackspace
This commit is contained in:
Wesley Beary 2012-08-20 12:42:31 -07:00
commit 959f14613c

View file

@ -39,11 +39,11 @@ module Fog
requires :key
@public_url ||= begin
begin response = connection.cdn.head_container(key)
if response.headers['X-CDN-Enabled'] == 'True'
if response.headers['X-Cdn-Enabled'] == 'True'
if connection.rackspace_cdn_ssl == true
response.headers['X-CDN-SSL-URI']
response.headers['X-Cdn-Ssl-Uri']
else
cdn_cname || response.headers['X-CDN-URI']
cdn_cname || response.headers['X-Cdn-Uri']
end
end
rescue Fog::Service::NotFound