summaryrefslogtreecommitdiff
path: root/lib/api/internal/pages.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-12-03 12:09:39 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-12-03 12:09:39 +0000
commitf145ef4be75f3711c52a680b86d96568e9acf385 (patch)
tree5e90358a166062305cf41f73e541cf4744b76c4d /lib/api/internal/pages.rb
parent544eaa90817fa8595826fbd44f37452c76b56378 (diff)
downloadgitlab-ce-CSTarun.tar.gz
Add latest changes from gitlab-org/gitlab@masterCSTarun
Diffstat (limited to 'lib/api/internal/pages.rb')
-rw-r--r--lib/api/internal/pages.rb43
1 files changed, 23 insertions, 20 deletions
diff --git a/lib/api/internal/pages.rb b/lib/api/internal/pages.rb
index 690f52d89f3..8eaeeae26c2 100644
--- a/lib/api/internal/pages.rb
+++ b/lib/api/internal/pages.rb
@@ -32,26 +32,29 @@ module API
requires :host, type: String, desc: 'The host to query for'
end
get "/" do
- serverless_domain_finder = ServerlessDomainFinder.new(params[:host])
- if serverless_domain_finder.serverless?
- # Handle Serverless domains
- serverless_domain = serverless_domain_finder.execute
- no_content! unless serverless_domain
-
- virtual_domain = Serverless::VirtualDomain.new(serverless_domain)
- no_content! unless virtual_domain
-
- present virtual_domain, with: Entities::Internal::Serverless::VirtualDomain
- else
- # Handle Pages domains
- host = Namespace.find_by_pages_host(params[:host]) || PagesDomain.find_by_domain_case_insensitive(params[:host])
- no_content! unless host
-
- virtual_domain = host.pages_virtual_domain
- no_content! unless virtual_domain
-
- present virtual_domain, with: Entities::Internal::Pages::VirtualDomain
- end
+ ##
+ # Serverless domain proxy has been deprecated and disabled as per
+ # https://gitlab.com/gitlab-org/gitlab-pages/-/issues/467
+ #
+ # serverless_domain_finder = ServerlessDomainFinder.new(params[:host])
+ # if serverless_domain_finder.serverless?
+ # # Handle Serverless domains
+ # serverless_domain = serverless_domain_finder.execute
+ # no_content! unless serverless_domain
+ #
+ # virtual_domain = Serverless::VirtualDomain.new(serverless_domain)
+ # no_content! unless virtual_domain
+ #
+ # present virtual_domain, with: Entities::Internal::Serverless::VirtualDomain
+ # end
+
+ host = Namespace.find_by_pages_host(params[:host]) || PagesDomain.find_by_domain_case_insensitive(params[:host])
+ no_content! unless host
+
+ virtual_domain = host.pages_virtual_domain
+ no_content! unless virtual_domain
+
+ present virtual_domain, with: Entities::Internal::Pages::VirtualDomain
end
end
end