Rails + Carrierwave + S3 で https 経由で画像を提供するにはどうすればよいですか?
現在、画像は次の場所から取得されています。
http://distilleryimage1.s3.amazonaws.com/f5314e1c866911e181b812314804a181_7.jpg
から来てほしい:
https://distilleryimage1.s3.amazonaws.com/f5314e1c866911e181b812314804a181_7.jpg
編集
画像が任意の数のホストから提供されていることがわかります。
distilleryimage11.s3
、distillery.s3
、など...
プロトコルを設定する方法はありますか?
ここに私のイニシャライザがあります:
CarrierWave.configure do |config|
config.fog_credentials = {
:provider => 'AWS',
:aws_access_key_id => CONFIG['s3-key'],
:aws_secret_access_key => CONFIG['s3-secret'],
:region => 'us-east-1'
}
config.fog_directory = 'my_dir'
# config.fog_host = 'https://distilleryimage1.s3.amazonaws.com' # optional, defaults to nil
end