Skip to content

Add 127.0.0.1 as a local domain

Sarah German requested to merge local-domains into main

What does this MR do and why?

Follow-up from !3889 (comment 1409595126)

We have some logic on the site to determine whether or not to show links to older versions in the Versions dropdown.

  • We do not want to show these links on Archive sites, or self-hosted docs sites.
  • We do want to show them on docs.gitlab.com (production site), review apps and local environments.

We'd marked localhost as a local environment, but 127.0.0.1 is also a valid local dev URL. This MR adds it the object that defines these hosts. This should eliminate a possible point of confusion when working on or testing with a local dev site.

Screenshots, screen recordings, or links to review app

Before After
image image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md.
  2. Check out this branch
  3. Run the site: make view
  4. Verify the versions dropdown contains the same links on both of these URLs: http://localhost:3000 and http://127.0.0.1:3000

Merge request acceptance checklist

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

Merge request reports