lib/cloudfiles/container.rb in cloudfiles-1.4.1 vs lib/cloudfiles/container.rb in cloudfiles-1.4.2
- old
+ new
@@ -244,10 +244,10 @@
# => true
def make_public(ttl = 86400)
response = self.connection.cfreq("PUT",@cdnmgmthost,@cdnmgmtpath,@cdnmgmtport,@cdnmgmtscheme)
raise NoSuchContainerException, "Container #{@name} does not exist" unless (response.code == "201" || response.code == "202")
- headers = { "X-TTL" => ttl.to_s }
+ headers = { "X-TTL" => ttl.to_s , "X-CDN-Enabled" => "True" }
response = self.connection.cfreq("POST",@cdnmgmthost,@cdnmgmtpath,@cdnmgmtport,@cdnmgmtscheme,headers)
raise NoSuchContainerException, "Container #{@name} does not exist" unless (response.code == "201" || response.code == "202")
true
end