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:
authorKia Mei Somabes <kssomabes@up.edu.ph>2018-07-12 05:23:00 +0300
committerKia Mei Somabes <kssomabes@up.edu.ph>2018-07-12 05:23:00 +0300
commit9f57ae11e935d2a8a2b175d8382ed87020727845 (patch)
tree87a309a07ce9f1765700bdd062544cb3c9acc398 /app/controllers/projects/raw_controller.rb
parent50c128944e5e65fb5124aeb790cc0f1ec06049d3 (diff)
Set content-disposition header for single file download in repository
Diffstat (limited to 'app/controllers/projects/raw_controller.rb')
-rw-r--r--app/controllers/projects/raw_controller.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/controllers/projects/raw_controller.rb b/app/controllers/projects/raw_controller.rb
index 9bc774b7636..f6bfe4a5747 100644
--- a/app/controllers/projects/raw_controller.rb
+++ b/app/controllers/projects/raw_controller.rb
@@ -10,7 +10,6 @@ class Projects::RawController < Projects::ApplicationController
def show
@blob = @repository.blob_at(@commit.id, @path)
-
if @blob
headers['X-Content-Type-Options'] = 'nosniff'
@@ -19,7 +18,7 @@ class Projects::RawController < Projects::ApplicationController
if @blob.stored_externally?
send_lfs_object
else
- send_git_blob @repository, @blob
+ send_git_blob @repository, @blob, params[:inline]
end
else
render_404