Do not allow both host and hosts for proxy configuration

This commit is contained in:
Dmytro Shteflyuk
2024-09-28 20:13:14 -04:00
parent 1d48a0fb0a
commit 8df7d7d92d
3 changed files with 10 additions and 1 deletions

View File

@@ -28,6 +28,11 @@ class ConfigurationProxyTest < ActiveSupport::TestCase
assert_raises(Kamal::ConfigurationError) { config.proxy.ssl? }
end
test "ssl with both host and hosts" do
@deploy[:proxy] = { "ssl" => true, host: "example.com", hosts: [ "anotherexample.com" ] }
assert_raises(Kamal::ConfigurationError) { config.proxy.ssl? }
end
test "ssl false" do
@deploy[:proxy] = { "ssl" => false }
assert_not config.proxy.ssl?