about summary refs log tree commit diff
path: root/config/initializers
diff options
context:
space:
mode:
authorJoachim Viide <jviide@iki.fi>2017-04-16 05:01:58 +0300
committerEugen <eugen@zeonfederated.com>2017-04-16 04:01:58 +0200
commit363de2dffdfbc73fe87d0b1afaf7fefed0aeabba (patch)
treedf26af8bed7d043fb421d650577263492ba34b0a /config/initializers
parent6a1ac9b31fb6a8270bb6e25b1a8a459abf7a4f25 (diff)
Leave out the "Expires" header from S3 uploads (#1886)
Diffstat (limited to 'config/initializers')
-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 202c102c7..77bc13b3a 100644
--- a/config/initializers/paperclip.rb
+++ b/config/initializers/paperclip.rb
@@ -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' }