Class: Nginx::Builder::SiteHttps
- Includes:
- Https
- Defined in:
- lib/shared_infrastructure/nginx/builder.rb
Instance Attribute Summary collapse
-
#certificate_domain ⇒ Object
readonly
Returns the value of attribute certificate_domain.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(user, certificate_domain = nil, domain: nil) ⇒ SiteHttps
constructor
A new instance of SiteHttps.
Methods included from Https
Methods inherited from Site
Methods inherited from Base
#https_reminder_message, #save, #to_s
Constructor Details
#initialize(user, certificate_domain = nil, domain: nil) ⇒ SiteHttps
Returns a new instance of SiteHttps.
148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/shared_infrastructure/nginx/builder.rb', line 148 def initialize(user, certificate_domain = nil, domain: nil) @certificate_domain = certificate_domain || domain.domain_name super(user, Nginx::ServerBlock.new( server: Nginx::StaticServer.new(domain: domain), listen: Nginx::ListenHttps.new(domain.domain_name, certificate_domain), location: Nginx::Location.new ), Nginx::TlsRedirectServerBlock.new(domain.domain_names), domain: domain ) end |
Instance Attribute Details
#certificate_domain ⇒ Object (readonly)
Returns the value of attribute certificate_domain.
162 163 164 |
# File 'lib/shared_infrastructure/nginx/builder.rb', line 162 def certificate_domain @certificate_domain end |