How do I get my Rails + Carrierwave + S3 to serve images over https?
Right now the images come from:
http://distilleryimage1.s3.amazonaws.com/f5314e1c866911e181b812314804a181_7.jpg
I want it to come from:
https://distilleryimage1.s3.amazonaws.com/f5314e1c866911e181b812314804a181_7.jpg
Edit
Turns out the images are served from any number of hosts:
distilleryimage11.s3
, distillery.s3
, etc...
Is there a way to just set the protocol?
Here's my initializer:
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