Do not allow both host and hosts for proxy configuration
This commit is contained in:
@@ -31,7 +31,7 @@ proxy:
|
||||
# Hosts
|
||||
#
|
||||
# The hosts that will be used to serve the app. The proxy will only route requests
|
||||
# to this host to your app.
|
||||
# to these hosts to your app.
|
||||
#
|
||||
# If no hosts are set, then all requests will be forwarded, except for matching
|
||||
# requests for other apps deployed on that server that do have a host set.
|
||||
|
||||
@@ -6,6 +6,10 @@ class Kamal::Configuration::Validator::Proxy < Kamal::Configuration::Validator
|
||||
if config["host"].blank? && config["hosts"].blank? && config["ssl"]
|
||||
error "Must set a host to enable automatic SSL"
|
||||
end
|
||||
|
||||
if config["host"].present? && config["hosts"].present?
|
||||
error "Must use either 'host' or 'hosts', not both"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user