[go: up one dir, main page]

Fix: Change admin button URL from absolute to relative path to fix URL on Geo secondaries

Relates to issue #565596 (closed)

Changes

  • Change admin_url from admin_root_url to admin_root_path in sidebars_helper.rb to use relative path instead of absolute URL
  • This ensures the Admin button stays on the current Geo site instead of pointing to the primary site when on a Geo secondary

Before Change

  • The Admin button would alway links to the primary site's URL (e.g., http://127.0.0.1:3000/admin), even if you were on the Geo secondary - http://127.0.0.1:3001 )

After Change

  • The Admin button points to the primary Admin path when on the primary http://127.0.0.1:3000/admin and the secondary Admin path when on the secondary http://127.0.0.1:3001/admin

Testing

  1. Follow the Easy Installation for GDK to set up 2 Geo instances - a primary and a secondary - https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/72a913f8fbdda624c8f0c9572e3c61d0e14b9e19/doc/howto/geo.md#easy-installation
  2. Visit the primary and check that the Admin button at the bottom of the sidebar points to the Admin page on the primary
  3. Visit the secondary and check that the Admin button on the bottom of the sidebar points to the Admin page on the secondary
Edited by Scott Murray

Merge request reports

Loading