Merge pull request #1559 from basecamp/default-proxy-config-if-nil
Default the proxy config if it is nil
This commit is contained in:
@@ -63,7 +63,7 @@ class Kamal::Configuration
|
||||
@env = Env.new(config: @raw_config.env || {}, secrets: secrets)
|
||||
|
||||
@logging = Logging.new(logging_config: @raw_config.logging)
|
||||
@proxy = Proxy.new(config: self, proxy_config: @raw_config.key?(:proxy) ? @raw_config.proxy : {})
|
||||
@proxy = Proxy.new(config: self, proxy_config: @raw_config.proxy)
|
||||
@proxy_boot = Proxy::Boot.new(config: self)
|
||||
@ssh = Ssh.new(config: self)
|
||||
@sshkit = Sshkit.new(config: self)
|
||||
|
||||
@@ -11,6 +11,7 @@ class Kamal::Configuration::Proxy
|
||||
def initialize(config:, proxy_config:, context: "proxy")
|
||||
@config = config
|
||||
@proxy_config = proxy_config
|
||||
@proxy_config = {} if @proxy_config.nil?
|
||||
validate! @proxy_config, with: Kamal::Configuration::Validator::Proxy, context: context
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user