Class: Nginx::Builder::ReverseProxyHttps
- 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(proxy_url, certificate_domain = nil, domain: nil) ⇒ ReverseProxyHttps
constructor
A new instance of ReverseProxyHttps.
Methods included from Https
Methods inherited from Base
#https_reminder_message, #save, #to_s
Constructor Details
#initialize(proxy_url, certificate_domain = nil, domain: nil) ⇒ ReverseProxyHttps
Returns a new instance of ReverseProxyHttps.
85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/shared_infrastructure/nginx/builder.rb', line 85 def initialize(proxy_url, certificate_domain = nil, domain: nil) @certificate_domain = certificate_domain || domain.domain_name super(Nginx::ServerBlock.new( server: Nginx::Server.new(domain: domain), listen: Nginx::ListenHttps.new(domain.domain_name, certificate_domain), location: Nginx::ReverseProxyLocation.new(proxy_url) ), Nginx::TlsRedirectServerBlock.new(domain.domain_name), domain: domain ) end |
Instance Attribute Details
#certificate_domain ⇒ Object (readonly)
Returns the value of attribute certificate_domain.
98 99 100 |
# File 'lib/shared_infrastructure/nginx/builder.rb', line 98 def certificate_domain @certificate_domain end |