We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d0a1588 commit 2d01edcCopy full SHA for 2d01edc
lib/http-proxy/passes/web-outgoing.js
@@ -42,7 +42,7 @@ var redirectRegex = /^201|30(1|2|7|8)$/;
42
function setConnection(req, res, proxyRes) {
43
if (req.httpVersion === '1.0') {
44
proxyRes.headers.connection = req.headers.connection || 'close';
45
- } else if (!proxyRes.headers.connection) {
+ } else if (req.httpVersion !== '2.0' && !proxyRes.headers.connection) {
46
proxyRes.headers.connection = req.headers.connection || 'keep-alive';
47
}
48
},
0 commit comments