summaryrefslogtreecommitdiff
path: root/lib/gitlab/middleware/read_only.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/middleware/read_only.rb')
-rw-r--r--lib/gitlab/middleware/read_only.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/middleware/read_only.rb b/lib/gitlab/middleware/read_only.rb
index 0de0cddcce4..32f90c0c447 100644
--- a/lib/gitlab/middleware/read_only.rb
+++ b/lib/gitlab/middleware/read_only.rb
@@ -77,11 +77,11 @@ module Gitlab
end
def grack_route
- request.path.end_with?('.git/git-upload-pack')
+ route_hash[:controller] == 'projects/git_http' && route_hash[:action] == 'git_upload_pack'
end
def lfs_route
- request.path.end_with?('/info/lfs/objects/batch')
+ route_hash[:controller] == 'projects/lfs_api' && route_hash[:action] == 'batch'
end
end
end