]> cat aescling's git repositories - mastodon.git/commitdiff
Change to switch signature version for Amazon S3 (#2124)
authorYamagishi Kazutoshi <ykzts@desire.sh>
Wed, 19 Apr 2017 12:18:50 +0000 (21:18 +0900)
committerEugen <eugen@zeonfederated.com>
Wed, 19 Apr 2017 12:18:50 +0000 (14:18 +0200)
.env.production.sample
config/initializers/paperclip.rb

index 28afee246c8b0900d4d0c58ed20af0aa5ad29511..16ffd0803cf1ed19535cb5c8cbdb9894e5f87e2b 100644 (file)
@@ -74,6 +74,7 @@ SMTP_FROM_ADDRESS=notifications@example.com
 # S3_PROTOCOL=https
 # S3_HOSTNAME=
 # S3_ENDPOINT=
+# S3_SIGNATURE_VERSION=
 
 # Optional alias for S3 if you want to use Cloudfront or Cloudflare in front
 # S3_CLOUDFRONT_HOST=
index ffaa2566e1cefb6b155a53c9b6325ec529bddec9..af65ca818865d577a22c9ce41caff665db20f24e 100644 (file)
@@ -28,6 +28,7 @@ if ENV['S3_ENABLED'] == 'true'
   unless ENV['S3_ENDPOINT'].blank?
     Paperclip::Attachment.default_options[:s3_options] = {
       endpoint: ENV['S3_ENDPOINT'],
+      signature_version: ENV['S3_SIGNATURE_VERSION'] || 'v4',
       force_path_style: true,
     }