Duplicated relative url part inside "Package Registry > Registry setup" URL

Summary

On a Gitlab Instance with relative url, the provided URL unter "Package Registry > Registry setup" has the relative url path twice in it.

See image example below.

Steps to reproduce

  1. Setup new environment with relative url with external_url 'http://<your-domain>/gitlab'
  2. Follow additional steps: https://docs.gitlab.com/ee/install/relative_url.html#enable-relative-url-in-gitlab
  3. deploy e.g. any maven project to this server

Example Project

As before, any maven project is possible.

I used this example: https://gitlab.com/tang-test/gitlab-maven-test

Note: Adjustments (for your domain/project):

  1. pom.xml
    change: https://gitlab.com/
    to: http://<your-domain>/gitlab/
  2. ci_settings.xml
    I switched to Deploy tokens (as this was the fastest for me)

If the CI/C "passed" you should see the package and the wrong URLs under:
Packages & Registries > Package Registry

What is the current bug behavior?

Display the URL with duplicated relative url part. (see image)

What is the expected correct behavior?

The relative url part should only be once in the url. Image example should be: http://<your-domain>/gitlab/api/v4/projects/2/packages/maven

Relevant logs and/or screenshots

Example: relative url is /gitlab (just once!)

gitlab-gitlab2

Possible fixes

Manipulate URLs after Copy&Paste and remove the relative url part once.