Class: Nginx::Builder::RailsHttps
- 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 Rails
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(user, certificate_domain = nil, accel_location: nil, domain: nil, rails_env: "production") ⇒ RailsHttps
constructor
A new instance of RailsHttps.
Methods included from Https
Methods inherited from Rails
Methods inherited from Site
Methods inherited from Base
#https_reminder_message, #save, #to_s
Constructor Details
#initialize(user, certificate_domain = nil, accel_location: nil, domain: nil, rails_env: "production") ⇒ RailsHttps
Returns a new instance of RailsHttps.
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/shared_infrastructure/nginx/builder.rb', line 222 def initialize(user, certificate_domain = nil, accel_location: nil, domain: nil, rails_env: "production") @certificate_domain = certificate_domain || domain.domain_name accel_location = Accel.new(accel_location, domain) if accel_location super(user, Nginx::ServerBlock.new( upstream: Nginx::Upstream.new(domain.domain_name), server: Nginx::RailsServer.new(domain: domain), listen: Nginx::ListenHttps.new(domain.domain_name, certificate_domain), location: [ Nginx::RailsLocation.new(domain.domain_name), accel_location ? Nginx::AccelLocation.new(domain.domain_name, accel_location) : nil, Nginx::ActionCableLocation.new(domain.domain_name) ].compact, accel_location: accel_location, domain: domain ), Nginx::TlsRedirectServerBlock.new(domain.domain_names), domain: domain, rails_env: rails_env ) end |
Instance Attribute Details
#certificate_domain ⇒ Object (readonly)
Returns the value of attribute certificate_domain.
244 245 246 |
# File 'lib/shared_infrastructure/nginx/builder.rb', line 244 def certificate_domain @certificate_domain end |