Skip to content

Make api_v4_XXX route helpers use relative URL roots

We've started using API endpoints that don't handle relative URL roots properly (e.g. api_v4_xxx) (e.g. https://gitlab.com/gitlab-org/gitlab-ce/issues/61280, https://gitlab.com/gitlab-org/gitlab-ce/issues/60851), and the solution has been to use expose_url. This has a number of issues:

  1. api_v4_xxx should Just Work (tm)
  2. expose_url converts a perfectly reasonable path to a URL
  3. expose_url doesn't expose the right hostname/scheme/port in some cases

Ideally, grape-path-helpers can be modified to use the relative URL root, and then we can look at fixing expose_url.

Edited by 🤖 GitLab Bot 🤖