mirror of
https://github.com/caddyserver/caddy.git
synced 2026-05-30 10:35:18 -04:00
Proxy: Add keepalive directive to proxy to set MaxIdleConnsPerHost on transport. Fixes #938
This commit is contained in:
@@ -108,7 +108,7 @@ func (p Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
|
||||
if nameURL, err := url.Parse(host.Name); err == nil {
|
||||
outreq.Host = nameURL.Host
|
||||
if proxy == nil {
|
||||
proxy = NewSingleHostReverseProxy(nameURL, host.WithoutPathPrefix)
|
||||
proxy = NewSingleHostReverseProxy(nameURL, host.WithoutPathPrefix, 0)
|
||||
}
|
||||
|
||||
// use upstream credentials by default
|
||||
|
||||
Reference in New Issue
Block a user