Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/pages/lookup_path.rb')
-rw-r--r--app/models/pages/lookup_path.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/pages/lookup_path.rb b/app/models/pages/lookup_path.rb
index e8becc833ca..8a02415aef4 100644
--- a/app/models/pages/lookup_path.rb
+++ b/app/models/pages/lookup_path.rb
@@ -55,6 +55,12 @@ module Pages
strong_memoize_attr :prefix
def unique_host
+ # When serving custom domain we don't present the unique host to avoid
+ # GitLab Pages auto-redirect to the unique domain instead of keeping serving
+ # from the custom domain.
+ # https://gitlab.com/gitlab-org/gitlab/-/issues/426435
+ return if domain.present?
+
url_builder.unique_host
end
strong_memoize_attr :unique_host