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 96be92f4d8
commit 009aad7715

View File

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