proxy/host -> proxy/hosts

This commit is contained in:
Donal McBreen
2024-09-12 12:32:32 +01:00
parent f4d309c5cc
commit 2125327d54
2 changed files with 8 additions and 7 deletions

View File

@@ -7,15 +7,16 @@
# run on the same proxy.
proxy:
# Host
# Hosts
#
# This is the host that will be used to serve the app. By setting this you can run
# multiple apps on the same server sharing the same instance of the proxy.
# These are the hosts that will be used to serve the app. If you deploy more
# than one application to a single host, the proxy will route requests based
# these hosts
#
# If this is set only requests that match this host will be forwarded by the proxy.
# if this is not set, then all requests will be forwarded, except for matching
# If no hosts are set, then all requests will be forwarded, except for matching
# requests for other apps that do have a host set.
host: foo.example.com
hosts:
- foo.example.com
# App port
#

View File

@@ -36,7 +36,7 @@ class Kamal::Configuration::Proxy
def deploy_options
{
host: proxy_config["host"],
host: proxy_config.fetch("hosts", []).first,
tls: proxy_config["ssl"],
"deploy-timeout": proxy_config["deploy_timeout"],
"drain-timeout": proxy_config["drain_timeout"],