about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-12-10 07:40:01 +0100
committerGitHub <noreply@github.com>2019-12-10 07:40:01 +0100
commit17159625b3e2c6d94509c0c2879ca80efbac6846 (patch)
tree5ce86a83c32d107e2ced7e7cc161b97ea10666b7
parent7ee6f51b7865ff8f5dd21a8a4ec3aad23170b8c6 (diff)
Add `S3_OVERRIDE_PATH_STYLE` environment variable (#12594)
To support Exoscale
-rw-r--r--config/initializers/paperclip.rb2
1 files changed, 1 insertions, 1 deletions
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'