diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 18:40:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 18:40:28 +0300 |
commit | b595cb0c1dec83de5bdee18284abe86614bed33b (patch) | |
tree | 8c3d4540f193c5ff98019352f554e921b3a41a72 /app/models/pages_domain.rb | |
parent | 2f9104a328fc8a4bddeaa4627b595166d24671d0 (diff) |
Add latest changes from gitlab-org/gitlab@15-2-stable-eev15.2.0-rc42
Diffstat (limited to 'app/models/pages_domain.rb')
-rw-r--r-- | app/models/pages_domain.rb | 10 |
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 |