From: Eugen Rochko Date: Tue, 10 Dec 2019 06:40:01 +0000 (+0100) Subject: Add `S3_OVERRIDE_PATH_STYLE` environment variable (#12594) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=17159625b3e2c6d94509c0c2879ca80efbac6846;p=mastodon.git Add `S3_OVERRIDE_PATH_STYLE` environment variable (#12594) To support Exoscale --- diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index dadc492a0..5109baff7 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -52,7 +52,7 @@ if ENV['S3_ENABLED'] == 'true' if ENV.has_key?('S3_ENDPOINT') Paperclip::Attachment.default_options[:s3_options].merge!( endpoint: ENV['S3_ENDPOINT'], - force_path_style: true + force_path_style: ENV['S3_OVERRIDE_PATH_STYLE'] != 'true', ) Paperclip::Attachment.default_options[:url] = ':s3_path_url'