我的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
但我看到图像路由到https://s3-eu-west-1.amazonaws.com/pro ...
但是,我看到我的资产 js、css 和图像资产工作正常:
http://cdn0.domain.com/assets/logo-4cbddb290494d56e25f86fffa93f4b00.png
我在这个配置中做错了什么?