Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2017-02-22 21:30:53 +0300
committerPawel Chojnacki <pawel@chojnacki.ws>2017-02-22 22:34:23 +0300
commitf7cd5fd79ab94c391e1a285973855b6c7b4452a1 (patch)
treea63fc290ee007c5100c1073cd95ee72be59583ab /app/controllers
parent29b59456d04a6e3febb70048b8b7f4b4082b8e05 (diff)
Ensure mutable uploads are not cached without revalidation
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/uploads_controller.rb2
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