I have this in my fog.rb
CarrierWave.configure do |config|
config.fog_credentials = {
:provider => 'AWS',
:aws_access_key_id => 'key',
:aws_secret_access_key => 'key',
:region => 'eu-west-1'
}
config.fog_host = proc { "http://cdn#{(rand * 4).ceil}.domain.com" }
config.fog_directory = 'pro'
config.fog_public = false
config.fog_attributes = {'Cache-Control' => 'max-age=315576000'}
end
But I see the images routes to https://s3-eu-west-1.amazonaws.com/pro...
However my assets js, css, and images assets works fine I see:
http://cdn0.domain.com/assets/logo-4cbddb290494d56e25f86fffa93f4b00.png
What am I doing wrong in this config?
I don't think there's enough info to really help you but I think I see one problem: in your proc, the .ceil should be a .floor. Otherwise, you'll never get cdn0