Proxy: Add keepalive directive to proxy to set MaxIdleConnsPerHost on transport. Fixes #938

This commit is contained in:
Nimi Wariboko Jr
2016-08-01 15:47:31 -07:00
parent da5b3cfc50
commit db4cd8ee2d
4 changed files with 52 additions and 21 deletions
+1 -1
View File
@@ -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