diff --git a/lib/http-proxy/passes/web-outgoing.js b/lib/http-proxy/passes/web-outgoing.js index f21d117..8bda893 100644 --- a/lib/http-proxy/passes/web-outgoing.js +++ b/lib/http-proxy/passes/web-outgoing.js @@ -42,7 +42,7 @@ var redirectRegex = /^201|30(1|2|7|8)$/; function setConnection(req, res, proxyRes) { if (req.httpVersion === '1.0') { proxyRes.headers.connection = req.headers.connection || 'close'; - } else if (!proxyRes.headers.connection) { + } else if (req.httpVersion !== '2.0' && !proxyRes.headers.connection) { proxyRes.headers.connection = req.headers.connection || 'keep-alive'; } },