summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorJason Hollingsworth <jhworth.developer@gmail.com>2013-12-20 13:12:44 -0600
committerJason Hollingsworth <jhworth.developer@gmail.com>2014-01-02 10:18:56 -0600
commit7cc25205410efc6b20b11d94ab2cbc1a322ff816 (patch)
tree8d8ce2cd304bd46426bb4c186ca690e6650e5d57 /config
parentb512fbc0ecba0a8de9c9efe5c7d82a97f0ea744c (diff)
downloadgitlab-ce-7cc25205410efc6b20b11d94ab2cbc1a322ff816.tar.gz
Add support for various archive formats.
Used mime-types gem instead of hardcoding content types. Allow multiple extensions in archive route (.tar.gz, .tar.bz2). Change content disposition from infile(?) to attachment for api. Fixed api would return “archive” instead of {project}-{hash}.{ext}
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 8322d6a9d4e..734421ede1d 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -217,7 +217,7 @@ Gitlab::Application.routes.draw do
resource :repository, only: [:show] do
member do
get "stats"
- get "archive"
+ get "archive", constraints: { format: Gitlab::Regex.archive_formats_regex }
end
end