From 2d01edc5a5ace591784022b85860a3bbc48c5e12 Mon Sep 17 00:00:00 2001 From: Niranjan Ojha Date: Wed, 5 Oct 2016 19:47:22 +0530 Subject: [PATCH] not setting connection header in case of http2 as it is deprecated --- lib/http-proxy/passes/web-outgoing.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'; } },