diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-06 20:59:06 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-06 20:59:06 +0100 |
commit | b835f4aa1ce12cc31a721750a857d8d08a50069a (patch) | |
tree | 7c836fc77ec76326f81f1f5536d286ea6fe9660c /config | |
parent | ea4170785a8f0f05cea93b1b64c00aa1008ef292 (diff) |
Fix insecure S3 URLs
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/paperclip.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index d72761250..74aa076fe 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -1,5 +1,8 @@ if ENV['S3_ENABLED'] == 'true' - Paperclip::Attachment.default_options[:storage] = :s3 + Paperclip::Attachment.default_options[:storage] = :s3 + Paperclip::Attachment.default_options[:s3_protocol] = 'https' + Paperclip::Attachment.default_options[:url] = ':s3_domain_url' + Paperclip::Attachment.default_options[:path] = '/:class/:attachment/:id_partition/:style/:filename' Paperclip::Attachment.default_options[:s3_credentials] = { bucket: ENV.fetch('S3_BUCKET'), @@ -7,7 +10,4 @@ if ENV['S3_ENABLED'] == 'true' secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY'), s3_region: ENV.fetch('S3_REGION') } - - Paperclip::Attachment.default_options[:url] = ':s3_domain_url' - Paperclip::Attachment.default_options[:path] = '/:class/:attachment/:id_partition/:style/:filename' end |