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
path: root/config
diff options
context:
space:
mode:
authorRubén Dávila <ruben@gitlab.com>2018-02-07 16:00:53 +0300
committerRubén Dávila <ruben@gitlab.com>2018-02-07 17:04:00 +0300
commitbed948321173b49564f39837e97212ee4dd96e03 (patch)
tree72e6faa9f68378f997f876cf9550561bad546028 /config
parentead97c55eac773444dee547a934112aa282c2e2e (diff)
Backport of LFS File Locking API
Diffstat (limited to 'config')
-rw-r--r--config/initializers/mime_types.rb2
-rw-r--r--config/routes/git_http.rb7
2 files changed, 8 insertions, 1 deletions
diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb
index 5e3e4c966cb..e9326653cbe 100644
--- a/config/initializers/mime_types.rb
+++ b/config/initializers/mime_types.rb
@@ -14,4 +14,4 @@ Mime::Type.register "video/webm", :webm
Mime::Type.register "video/ogg", :ogv
Mime::Type.unregister :json
-Mime::Type.register 'application/json', :json, %w(application/vnd.git-lfs+json application/json)
+Mime::Type.register 'application/json', :json, [LfsRequest::CONTENT_TYPE, 'application/json']
diff --git a/config/routes/git_http.rb b/config/routes/git_http.rb
index a53c94326d4..ff51823897d 100644
--- a/config/routes/git_http.rb
+++ b/config/routes/git_http.rb
@@ -16,6 +16,13 @@ scope(path: '*namespace_id/:project_id',
get '/*oid', action: :deprecated
end
+ scope(path: 'info/lfs') do
+ resources :lfs_locks, controller: :lfs_locks_api, path: 'locks' do
+ post :unlock, on: :member
+ post :verify, on: :collection
+ end
+ end
+
# GitLab LFS object storage
scope(path: 'gitlab-lfs/objects/*oid', controller: :lfs_storage, constraints: { oid: /[a-f0-9]{64}/ }) do
get '/', action: :download