summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorRubén Dávila <ruben@gitlab.com>2018-02-07 08:00:53 -0500
committerRubén Dávila <ruben@gitlab.com>2018-02-07 09:04:00 -0500
commitbed948321173b49564f39837e97212ee4dd96e03 (patch)
tree72e6faa9f68378f997f876cf9550561bad546028 /config
parentead97c55eac773444dee547a934112aa282c2e2e (diff)
downloadgitlab-ce-bed948321173b49564f39837e97212ee4dd96e03.tar.gz
Backport of LFS File Locking APIrd-35856-backport-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