mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Better formatting of conditional.
This commit is contained in:
parent
8c457441d4
commit
96366efce8
1 changed files with 7 additions and 1 deletions
|
@ -38,7 +38,13 @@ module Fog
|
|||
requires :key
|
||||
@public_url ||= begin
|
||||
begin response = connection.cdn.head_container(key)
|
||||
response.headers['X-CDN-Enabled'] == 'True' && (connection.rackspace_cdn_ssl == true ? response.headers['X-CDN-SSL-URI'] : 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
|
||||
|
|
Loading…
Add table
Reference in a new issue