Add ssl_redirect proxy option
This commit is contained in:
@@ -52,6 +52,13 @@ proxy:
|
|||||||
# Defaults to `false`:
|
# Defaults to `false`:
|
||||||
ssl: true
|
ssl: true
|
||||||
|
|
||||||
|
# SSL redirect
|
||||||
|
#
|
||||||
|
# By default, kamal-proxy will redirect all HTTP requests to HTTPS when SSL is enabled.
|
||||||
|
# If you prefer that HTTP traffic is passed through to your application (along with
|
||||||
|
# HTTPS traffic), you can disable this redirect by setting `ssl_redirect: false`:
|
||||||
|
ssl_redirect: false
|
||||||
|
|
||||||
# Forward headers
|
# Forward headers
|
||||||
#
|
#
|
||||||
# Whether to forward the `X-Forwarded-For` and `X-Forwarded-Proto` headers.
|
# Whether to forward the `X-Forwarded-For` and `X-Forwarded-Proto` headers.
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ class Kamal::Configuration::Proxy
|
|||||||
"max-request-body": proxy_config.dig("buffering", "max_request_body"),
|
"max-request-body": proxy_config.dig("buffering", "max_request_body"),
|
||||||
"max-response-body": proxy_config.dig("buffering", "max_response_body"),
|
"max-response-body": proxy_config.dig("buffering", "max_response_body"),
|
||||||
"forward-headers": proxy_config.dig("forward_headers"),
|
"forward-headers": proxy_config.dig("forward_headers"),
|
||||||
|
"tls-redirect": proxy_config.dig("ssl_redirect"),
|
||||||
"log-request-header": proxy_config.dig("logging", "request_headers") || DEFAULT_LOG_REQUEST_HEADERS,
|
"log-request-header": proxy_config.dig("logging", "request_headers") || DEFAULT_LOG_REQUEST_HEADERS,
|
||||||
"log-response-header": proxy_config.dig("logging", "response_headers")
|
"log-response-header": proxy_config.dig("logging", "response_headers")
|
||||||
}.compact
|
}.compact
|
||||||
|
|||||||
Reference in New Issue
Block a user