Version link is broken if using a relative URL
Summary
When GitLab is configured to use a relative URL, the version links (to gitlab.com) in the Help and Admin pages contain the relative URL.
Steps to reproduce
- Start a GitLab instance using a relative URL. Example using a docker-compose.yml file:
web:
image: 'gitlab/gitlab-ce:14.3.0-ce.0'
restart: always
hostname: '127.0.0.1'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://127.0.0.1/relative'
ports:
- '80:80'
- '443:443'
- '22:22'
volumes:
- '$GITLAB_HOME/config:/etc/gitlab'
- '$GITLAB_HOME/logs:/var/log/gitlab'
- '$GITLAB_HOME/data:/var/opt/gitlab
- Go to Admin Page or Help Page
- Click the version link
- The link is broken, it points to
https://gitlab.com/relative/gitlab-org/gitlab-foss/-/tags/v14.3.0
What is the current bug behavior?
The relative path is appended to gitlab.com.
What is the expected correct behavior?
The link points to an external URL, the relative path should not be appended.