Add gitlab-pages unique url lookup
What does this MR do and why?
Related to: #388179 (closed)
Enable gitlab pages to find sites by the unique domain.
Screenshots or screen recordings
Screen_Recording_2023-03-03_at_14.44.51
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Pre-conditions:
-
Enable the pages unique domain feature flag
Feature.enable(:pages_unique_domain)
-
Create a new project using the
Pages/Plain HTML
template -
Run the project pipeline to create a gitlab-pages deploy
-
Access the pages settings in
Settings > Pages
, like:http://gdk.test:3000/<project namespace>/pages
-
Enable
Use unique domain
and click inSave changes
-
Copy the URL in the
Access pages > Your pages are served under:
panel -
Remove the protocol and port from the URL and add it in you
/etc/hosts
pointing to localhost, something like:# Unique Domain 127.0.0.1 html-root-265cd6a7f146c5ae423a42292d2f66742749a886447617895e942.pages.gdk.test
-
You must be able to access the URL (with the protocol and port) in your browser, which mean that the lookup by the unique domain worked!
🎉
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.