From 21a4efe9a2a3244dc98ef5ac4287317aa4abf181 Mon Sep 17 00:00:00 2001 From: Kyle Rames Date: Tue, 12 Feb 2013 07:41:27 -0600 Subject: [PATCH] [rackspace|cdn] more refactoring of cdn --- lib/fog/rackspace/cdn.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/fog/rackspace/cdn.rb b/lib/fog/rackspace/cdn.rb index 36747c11f..be5db525a 100644 --- a/lib/fog/rackspace/cdn.rb +++ b/lib/fog/rackspace/cdn.rb @@ -52,8 +52,9 @@ module Fog private def url_from_headers(headers, cdn_cname) - return headers['X-Cdn-Ssl-Uri'] if ssl? - cdn_cname || headers['X-Cdn-Uri'] + return nil unless headers['X-Cdn-Enabled'] + return headers['X-Cdn-Ssl-Uri'] if ssl? + cdn_cname || headers['X-Cdn-Uri'] end end