88 lines
2.5 KiB
YAML
88 lines
2.5 KiB
YAML
# Proxy
|
|
#
|
|
# The proxy is configured in the root configuration under `proxy`. These are
|
|
# options that are set when deploying the application, not when booting the proxy
|
|
#
|
|
# They are application specific, so are not shared when multiple applications
|
|
# run on the same proxy.
|
|
proxy:
|
|
|
|
# Host
|
|
#
|
|
# The hosts that will be used to serve the app. The proxy will only route requests
|
|
# to this host to your app.
|
|
#
|
|
# 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
|
|
|
|
# App port
|
|
#
|
|
# The port the application container is exposed on
|
|
# Defaults to 80
|
|
app_port: 3000
|
|
|
|
# SSL
|
|
#
|
|
# Kamal Proxy can automatically obtain and renew TLS certificates for your applications.
|
|
# To ensure this set, the ssl flag. This only works if we are deploying to one server and
|
|
# the host flag is set.
|
|
ssl: true
|
|
|
|
# Deploy timeout
|
|
#
|
|
# How long to wait for the app to boot when deploying, defaults to 30 seconds
|
|
deploy_timeout: 10s
|
|
|
|
# Response timeout
|
|
#
|
|
# How long to wait for requests to complete before timing out, defaults to 10 seconds
|
|
response_timeout: 30s
|
|
|
|
# Healthcheck
|
|
#
|
|
# When deploying, the proxy will by default hit /up once every second until we hit
|
|
# the deploy timeout, with a 5 second timeout for each request.
|
|
#
|
|
# Once the app is up, the proxy will stop hitting the healthcheck endpoint.
|
|
healthcheck:
|
|
interval: 3
|
|
path: /health
|
|
timeout: 3
|
|
|
|
# Buffering
|
|
#
|
|
# Whether to buffer request and response bodies in the proxy
|
|
#
|
|
# By default buffering is enabled with a max request body size of 1GB and no limit
|
|
# for response size.
|
|
#
|
|
# You can also set the memory limit for buffering, which defaults to 1MB, anything
|
|
# larger than that is written to disk.
|
|
buffering:
|
|
requests: true
|
|
responses: true
|
|
max_request_body: 40_000_000
|
|
max_response_body: 0
|
|
memory: 2_000_000
|
|
|
|
# Logging
|
|
#
|
|
# Configure request logging for the proxy
|
|
# You can specify request and response headers to log.
|
|
# By default, Cache-Control and Last-Modified request headers are logged
|
|
logging:
|
|
request_headers:
|
|
- Cache-Control
|
|
- X-Forwarded-Proto
|
|
response_headers:
|
|
- X-Request-ID
|
|
- X-Request-Start
|
|
|
|
# Forward headers
|
|
#
|
|
# Whether to forward the X-Forwarded-For and X-Forwarded-Proto headers (defaults to false)
|
|
#
|
|
# If you are behind a trusted proxy, you can set this to true to forward the headers.
|
|
forward_headers: true
|