Support multiple external URLs
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=21319) </details> <!--IssueSummary end--> This issue (probably needs to be converted into epic) is about changing GitLab to support multiple external URLs. Things that needs to changed: 1. Stable link generation 2. CORS (example: https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5425#note_1448056007) 3. Possibly others! ---- ### Original Description I maintain a GitLab instance for my employer. The external URL is configured to `gitlab.MyFullCompanyName.local`, to ensure as much compatibility as possible. However, for day to day use, this is obnoxiously long and is generally elided to http://gitlab, or it's alias, http://git. I am happy that the FQDN is used for cloning URLs as this means remote URLs will almost always work (some machines don't have `MyFullCompanyName.local` in the DNS search suffixes and thus can't resolve the non-FQDN). But for access via the front-end, this discrepancy can cause issues, namely with links. Relative links and absolute links that start with `/` work, but truly absolute links that start with `http://gitlab.MyFullCompanyName.local/` are frustrating, as they send you to a different DN and require another login. ### Original Proposal What I propose depends on how the GitLab team views secondary external URLs: * **If** GitLab should work from any external URL from which it is accessible * **Then** I raise the issue that some links use the FQDN. The one that gets me is the project dropdown from the left-hand menu. When I search for a project, the link to that project uses the FQDN. * **If** GitLab should only be accessed from the configured external URL * **Then** I request a setting to allow it to be accessed from any external URL * **Or** I request a whitelist of multiple external URLs from which gitlab can be accessed. **Either way, I want this change to only apply to HTML links. I like the configured FQDN being used for cloning URLs and the registry.**
issue