diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-02-22 21:30:53 +0300 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-02-22 22:34:23 +0300 |
commit | f7cd5fd79ab94c391e1a285973855b6c7b4452a1 (patch) | |
tree | a63fc290ee007c5100c1073cd95ee72be59583ab /app/controllers/uploads_controller.rb | |
parent | 29b59456d04a6e3febb70048b8b7f4b4082b8e05 (diff) |
Ensure mutable uploads are not cached without revalidation
Diffstat (limited to 'app/controllers/uploads_controller.rb')
-rw-r--r-- | app/controllers/uploads_controller.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/uploads_controller.rb b/app/controllers/uploads_controller.rb index 509f4f412ca..f1bfd574f04 100644 --- a/app/controllers/uploads_controller.rb +++ b/app/controllers/uploads_controller.rb @@ -14,6 +14,8 @@ class UploadsController < ApplicationController end disposition = uploader.image? ? 'inline' : 'attachment' + + expires_in 0.seconds, must_revalidate: true, private: true send_file uploader.file.path, disposition: disposition end |