]> cat aescling's git repositories - mastodon.git/commitdiff
Add `S3_OVERRIDE_PATH_STYLE` environment variable (#12594)
authorEugen Rochko <eugen@zeonfederated.com>
Tue, 10 Dec 2019 06:40:01 +0000 (07:40 +0100)
committerGitHub <noreply@github.com>
Tue, 10 Dec 2019 06:40:01 +0000 (07:40 +0100)
To support Exoscale

config/initializers/paperclip.rb

index dadc492a014f73df601d1e38e715389022aca7e7..5109baff7017eca06b77db232bde522a34afe8fc 100644 (file)
@@ -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'