]> cat aescling's git repositories - mastodon.git/commitdiff
Leave out the "Expires" header from S3 uploads (#1886)
authorJoachim Viide <jviide@iki.fi>
Sun, 16 Apr 2017 02:01:58 +0000 (05:01 +0300)
committerEugen <eugen@zeonfederated.com>
Sun, 16 Apr 2017 02:01:58 +0000 (04:01 +0200)
config/initializers/paperclip.rb

index 202c102c7d05a8760de65fcdb0c27b753715c8d4..77bc13b3aa6e776f00e7a5d72049b77bea016838 100644 (file)
@@ -15,7 +15,7 @@ if ENV['S3_ENABLED'] == 'true'
   Paperclip::Attachment.default_options[:url]            = ':s3_domain_url'
   Paperclip::Attachment.default_options[:s3_host_name]   = ENV.fetch('S3_HOSTNAME') { "s3-#{ENV.fetch('S3_REGION')}.amazonaws.com" }
   Paperclip::Attachment.default_options[:path]           = '/:class/:attachment/:id_partition/:style/:filename'
-  Paperclip::Attachment.default_options[:s3_headers]     = { 'Cache-Control' => 'max-age=315576000', 'Expires' => 10.years.from_now.httpdate }
+  Paperclip::Attachment.default_options[:s3_headers]     = { 'Cache-Control' => 'max-age=315576000' }
   Paperclip::Attachment.default_options[:s3_permissions] = 'public-read'
   Paperclip::Attachment.default_options[:s3_region]      = ENV.fetch('S3_REGION') { 'us-east-1' }