Keep Grack::Auth in the routes for LFS only

This commit is contained in:
Jacob Vosmaer 2016-03-24 14:53:20 +01:00
parent 55f5a68f09
commit 8f3e86d72c
1 changed files with 3 additions and 0 deletions

View File

@ -59,6 +59,9 @@ Rails.application.routes.draw do
mount Sidekiq::Web, at: '/admin/sidekiq', as: :sidekiq
end
# Enable Grack support (for LFS only)
mount Grack::AuthSpawner, at: '/', constraints: lambda { |request| /[-\/\w\.]+\.git\/(info\/lfs|gitlab-lfs)/.match(request.path_info) }, via: [:get, :post, :put]
# Help
get 'help' => 'help#index'
get 'help/:category/:file' => 'help#show', as: :help_page, constraints: { category: /.*/, file: /[^\/\.]+/ }