Add forward headers support
This commit is contained in:
committed by
Donal McBreen
parent
d63ff8f251
commit
418d8045d8
@@ -91,3 +91,10 @@ proxy:
|
||||
max_request_body: 40_000_000
|
||||
max_response_body: 0
|
||||
memory: 2_000_000
|
||||
|
||||
# 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
|
||||
|
||||
@@ -48,7 +48,8 @@ class Kamal::Configuration::Proxy
|
||||
"buffer": proxy_config.fetch("buffer", { enabled: true }).fetch("enabled", true),
|
||||
"buffer-memory": proxy_config.dig("buffer", "memory"),
|
||||
"max-request-body": proxy_config.dig("buffer", "max_request_body"),
|
||||
"max-response-body": proxy_config.dig("buffer", "max_response_body")
|
||||
"max-response-body": proxy_config.dig("buffer", "max_response_body"),
|
||||
"forward-headers": proxy_config.dig("forward_headers")
|
||||
}.compact
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user