diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-03-07 17:05:30 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-03-07 17:05:30 +0000 |
commit | a41bff62e469b1d5d521648260e122a7110594cc (patch) | |
tree | 4394acc634123180b2d9d70a06fdb05196b8276d /app/controllers | |
parent | 4998f15169f0d8875676070ee29b5cbca96d582d (diff) | |
parent | f7cd5fd79ab94c391e1a285973855b6c7b4452a1 (diff) | |
download | gitlab-ce-a41bff62e469b1d5d521648260e122a7110594cc.tar.gz |
Merge branch '27936-avatar-has-wrong-cache-settings' into 'master'
Ensure uploads are not cached without revalidation
Closes #27936
See merge request !9453
Diffstat (limited to 'app/controllers')
-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 |