Skip to content

fix: Absolute redirects changed to relative Urls for GEO Secondary

What does this MR do and why?

Currently when Geo Proxying with Separate URLs is configured, the API requests from secondary are proxied to primary. As a result of this absolute urls returned from API like web_url, return the address of primary. This affects the links to Go to Project and Open MR after successful commit. As described in following issue, the end users, who are normally connected to Secondary, are redirected to primary URL and the user is impacted due to slower connection to Primary.

The solution implemented here uses path_with_namespace returned from API and combines with gitlabUrl from config. gitlabUrl should be also set accordingly in case GitLab is installed in a relative URL

Screen Recordings

  • primary: gdk.local:3000
  • secondary: gdk.local:3004
Before After
Screen_Recording_2024-08-12_at_09.01.49 Screen_Recording_2024-08-12_at_08.48.18

Related issues

Related to #341357 in GitLab canonical source project

Example MR

Similar behaviour happening on GitLab when visiting Frequently visited Groups/Projects is fixed via following MR

Edited by Eren Akca

Merge request reports

Loading