Skip to content

Use _path helpers instead of _url helpers in new navigation

Thomas Hutterer requested to merge 416213_use_relative_path into master

What does this MR do and why?

Replaces a couple of _url helpers with a _path helper. This should fix Why my GitLab instance is resolving to 127.0.0.... (#416213 - closed) where a customer reported problems with these _url-links on their self-managed instance. Read through the issue to see how we came to this solution.

In general, it’s preferred to use a path (/photos/10) over a full URL (http://domain.com/photos/10). This is because the URL uses the hostname configured with GitLab which may not match the request. Source

Screenshots or screen recordings

No visual changes.

How to set up and validate locally

Make sure the following things still work:

  • Pin/unpin nav items in the left sidebar (in the new nav)
  • Go to your profile by clicking your avatar in the sidebar and then clicking the first item in the dropdown (in the new nav)
  • Toggle between the new and old navigation (in your user dropdown)
  • Click the "Your work" header in any dashboard page, like http://gdk.test:3000/dashboard/activity (in the old nav)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Thomas Hutterer

Merge request reports

Loading