Skip to content

Accept more paths as Git HTTP

Markus Koller requested to merge toplevel-git-http-routes into master

Summary

With the introduction of group wikis we also need to support repository paths on the toplevel.

Related to gitlab#294007 (closed).

Background

This reintroduces the changes from !670 (merged), which were reverted in !681 (merged) because they were causing issues with old Git clients: gitlab-com/gl-infra/production#3387 (closed)

The problem was that we were only handling /info/refs Git HTTP requests in Workhorse if they had a valid service parameter. Otherwise they would be forwarded to Rails without the necessary JWT token, and caused an exception there.

So now we're back to forwarding all GET requests to a path ending in /info/refs, and let Rails deal with the missing service parameter as we did before. In that case Rails returns either a 401 or 403 response, depending on whether the user was authenticated or not. This behaviour is now verified on the Rails side in gitlab!53977 (merged).

Edited by Markus Koller

Merge request reports