GitLab links broken when working over SSH tunnel

Our GitLab server is running on a VM called “vmgitlab” inside the office intranet. The normal URL for accessing it in the intranet is http://vmgitlab/.

When I’m working from home I’m accessing the server over an ssh tunnel. The ssh tunnel forwards port 2280 on the local machine to port 80 on “vmgitlab”. The URL for accessing the GitLab server then is http://localhost:2280/.

This works for most of the web interface, but specific links in the web interface have the “vmgitlab” name in it. For example when browsing a repository “b” that belongs to group “a” over the link “http://localhost:2280/a/b”, then an attempt to access a file “c” in the top-level directory of repository “b” results in a link “http://vmgitlab/a/b/-/blob/master/c”. This link obviously doesn’t work over the tunnel. When I transform that link manually into “http://localhost:2280/a/b/-/blob/master/c” I can access the file as expected.

I found the following related posts and issues:


https://gitlab.com/gitlab-org/gitlab-foss/-/issues/45962

We are running GitLab Community Edition 12.10.1. Is this a configuration issue in our setup, or is this still a bug in the GitLab web interface?