mirror of
https://github.com/caddyserver/caddy.git
synced 2026-05-21 14:26:30 -04:00
reverseproxy: Configurable forward proxy URL (#6114)
Co-authored-by: WeidiDeng <weidi_deng@icloud.com>
This commit is contained in:
@@ -907,6 +907,7 @@ func (h *Handler) FinalizeUnmarshalCaddyfile(helper httpcaddyfile.Helper) error
|
||||
// read_buffer <size>
|
||||
// write_buffer <size>
|
||||
// max_response_header <size>
|
||||
// forward_proxy_url <url>
|
||||
// dial_timeout <duration>
|
||||
// dial_fallback_delay <duration>
|
||||
// response_header_timeout <duration>
|
||||
@@ -994,6 +995,12 @@ func (h *HTTPTransport) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
|
||||
return d.Errf("invalid proxy protocol version '%s'", proxyProtocol)
|
||||
}
|
||||
|
||||
case "forward_proxy_url":
|
||||
if !d.NextArg() {
|
||||
return d.ArgErr()
|
||||
}
|
||||
h.ForwardProxyURL = d.Val()
|
||||
|
||||
case "dial_timeout":
|
||||
if !d.NextArg() {
|
||||
return d.ArgErr()
|
||||
|
||||
Reference in New Issue
Block a user