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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-15 00:09:52 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-15 00:09:52 +0300
commitae93b284016c07a8a4b47e2510789253d14870f3 (patch)
treec7dc8690b841dd7d3a4eeeca944969d14df582a6 /app/models
parentf697dc5e76dfc5894df006d53b2b7e751653cf05 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models')
-rw-r--r--app/models/pages_domain.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/pages_domain.rb b/app/models/pages_domain.rb
index 37d45c5934d..486da2c6b45 100644
--- a/app/models/pages_domain.rb
+++ b/app/models/pages_domain.rb
@@ -1,6 +1,8 @@
# frozen_string_literal: true
class PagesDomain < ApplicationRecord
+ include Presentable
+
VERIFICATION_KEY = 'gitlab-pages-verification-code'
VERIFICATION_THRESHOLD = 3.days.freeze
SSL_RENEWAL_THRESHOLD = 30.days.freeze
@@ -13,6 +15,8 @@ class PagesDomain < ApplicationRecord
has_many :acme_orders, class_name: "PagesDomainAcmeOrder"
has_many :serverless_domain_clusters, class_name: 'Serverless::DomainCluster', inverse_of: :pages_domain
+ before_validation :clear_auto_ssl_failure, unless: :auto_ssl_enabled
+
validates :domain, hostname: { allow_numeric_hostname: true }
validates :domain, uniqueness: { case_sensitive: false }
validates :certificate, :key, presence: true, if: :usage_serverless?
@@ -208,6 +212,10 @@ class PagesDomain < ApplicationRecord
Pages::VirtualDomain.new([project], domain: self)
end
+ def clear_auto_ssl_failure
+ self.auto_ssl_failed = false
+ end
+
private
def pages_deployed?