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:
authorJacob Vosmaer (GitLab) <jacob@gitlab.com>2017-10-03 19:58:33 +0300
committerSean McGivern <sean@mcgivern.me.uk>2017-10-03 19:58:33 +0300
commit5dd26d4e5a5a27ca93e6d55b4261c42f4f70e762 (patch)
treef29535350ca0fe47d6c9fbddf8a915365b39d281 /app/controllers
parent6e0d17b8c605218ef5df8337fa573caa887bf41f (diff)
Hide Gollum inside Gitlab::Git::Wiki
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/wikis_controller.rb16
1 files changed, 6 insertions, 10 deletions
diff --git a/app/controllers/projects/wikis_controller.rb b/app/controllers/projects/wikis_controller.rb
index 968d880886c..a8ebdf5a4a9 100644
--- a/app/controllers/projects/wikis_controller.rb
+++ b/app/controllers/projects/wikis_controller.rb
@@ -18,16 +18,12 @@ class Projects::WikisController < Projects::ApplicationController
response.headers['Content-Security-Policy'] = "default-src 'none'"
response.headers['X-Content-Security-Policy'] = "default-src 'none'"
- if file.on_disk?
- send_file file.on_disk_path, disposition: 'inline'
- else
- send_data(
- file.raw_data,
- type: file.mime_type,
- disposition: 'inline',
- filename: file.name
- )
- end
+ send_data(
+ file.raw_data,
+ type: file.mime_type,
+ disposition: 'inline',
+ filename: file.name
+ )
else
return render('empty') unless can?(current_user, :create_wiki, @project)
@page = WikiPage.new(@project_wiki)