Configure direct download of files to browser

Gerrit by default wraps all file downloads in zipped archive. This
can be overridden using the mimetype setting[1]. This change allows
downloading of xml, yaml, rst, html, and txt files without being
wrapped inside of a zipped archives.

[1] https://review.openstack.org/Documentation/config-gerrit.html

Change-Id: I47563de12a2bc8c8a3755fa777abf029cc4e0c28
This commit is contained in:
Khai Do 2014-05-09 12:24:39 -07:00 committed by Jeremy Stanley
parent 1d103f57d4
commit 346618da6d
1 changed files with 19 additions and 9 deletions

View File

@ -81,20 +81,20 @@
email = <%= email %>
<% commentlinks.each do |commentlink| -%>
[commentlink "<%= commentlink['name'] %>"]
match = "<%= commentlink['match'] %>"
match = "<%= commentlink['match'] %>"
<% if commentlink['link'] != "" -%>
link = "<%= commentlink['link'] %>"
link = "<%= commentlink['link'] %>"
<% end -%>
<% if commentlink['html'] != "" -%>
html = "<%= commentlink['html'] %>"
html = "<%= commentlink['html'] %>"
<% end -%>
<% end -%>
[theme]
backgroundColor = ffffff
topMenuColor = ffffff
textColor = 264d69
trimColor = eef3f5
selectionColor = d1e6ea
backgroundColor = ffffff
topMenuColor = ffffff
textColor = 264d69
trimColor = eef3f5
selectionColor = d1e6ea
changeTableOutdatedColor = f5cccc
tableOddRowColor = ffffff
tableEvenRowColor = f5f5ff
@ -122,4 +122,14 @@
type = <%= secondary_index_type %>
<% end -%>
[mimetype "image/*"]
safe = true
safe = true
[mimetype "application/yaml"]
safe = true
[mimetype "application/xml"]
safe = true
[mimetype "application/rst"]
safe = true
[mimetype "application/txt"]
safe = true
[mimetype "application/html"]
safe = true