Skip to content
Snippets Groups Projects
Commit 8b8e140c authored by Yamagishi Kazutoshi's avatar Yamagishi Kazutoshi Committed by Eugen
Browse files

Change to switch signature version for Amazon S3 (#2124)

parent 8bac0350
No related branches found
No related tags found
No related merge requests found
...@@ -74,6 +74,7 @@ SMTP_FROM_ADDRESS=notifications@example.com ...@@ -74,6 +74,7 @@ SMTP_FROM_ADDRESS=notifications@example.com
# S3_PROTOCOL=https # S3_PROTOCOL=https
# S3_HOSTNAME= # S3_HOSTNAME=
# S3_ENDPOINT= # S3_ENDPOINT=
# S3_SIGNATURE_VERSION=
# Optional alias for S3 if you want to use Cloudfront or Cloudflare in front # Optional alias for S3 if you want to use Cloudfront or Cloudflare in front
# S3_CLOUDFRONT_HOST= # S3_CLOUDFRONT_HOST=
......
...@@ -28,6 +28,7 @@ if ENV['S3_ENABLED'] == 'true' ...@@ -28,6 +28,7 @@ if ENV['S3_ENABLED'] == 'true'
unless ENV['S3_ENDPOINT'].blank? unless ENV['S3_ENDPOINT'].blank?
Paperclip::Attachment.default_options[:s3_options] = { Paperclip::Attachment.default_options[:s3_options] = {
endpoint: ENV['S3_ENDPOINT'], endpoint: ENV['S3_ENDPOINT'],
signature_version: ENV['S3_SIGNATURE_VERSION'] || 'v4',
force_path_style: true, force_path_style: true,
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment