diff options
author | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2017-10-03 16:58:33 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-10-03 16:58:33 +0000 |
commit | 5dd26d4e5a5a27ca93e6d55b4261c42f4f70e762 (patch) | |
tree | f29535350ca0fe47d6c9fbddf8a915365b39d281 /app/controllers/projects/wikis_controller.rb | |
parent | 6e0d17b8c605218ef5df8337fa573caa887bf41f (diff) | |
download | gitlab-ce-5dd26d4e5a5a27ca93e6d55b4261c42f4f70e762.tar.gz |
Hide Gollum inside Gitlab::Git::Wiki
Diffstat (limited to 'app/controllers/projects/wikis_controller.rb')
-rw-r--r-- | app/controllers/projects/wikis_controller.rb | 16 |
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) |