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_domain.rb')
-rw-r--r--app/models/pages_domain.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/models/pages_domain.rb b/app/models/pages_domain.rb
index 93119bbff1f..9e93bff4acf 100644
--- a/app/models/pages_domain.rb
+++ b/app/models/pages_domain.rb
@@ -209,7 +209,15 @@ class PagesDomain < ApplicationRecord
def pages_virtual_domain
return unless pages_deployed?
- Pages::VirtualDomain.new([project], domain: self)
+ cache = if Feature.enabled?(:cache_pages_domain_api, project.root_namespace)
+ ::Gitlab::Pages::CacheControl.for_project(project.id)
+ end
+
+ Pages::VirtualDomain.new(
+ projects: [project],
+ domain: self,
+ cache: cache
+ )
end
def clear_auto_ssl_failure