class Nginx::Builder::ReverseProxyHttps

Attributes

certificate_domain[R]

Public Class Methods

new(proxy_url, certificate_domain = nil, domain: nil) click to toggle source
Calls superclass method Nginx::Builder::Base::new
# File lib/shared_infrastructure/nginx/builder.rb, line 86
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_names),
    domain: domain
  )
end