diff --git a/lib/http-proxy/passes/web-outgoing.js b/lib/http-proxy/passes/web-outgoing.js index 977f1f747..ad8b8d0c8 100644 --- a/lib/http-proxy/passes/web-outgoing.js +++ b/lib/http-proxy/passes/web-outgoing.js @@ -82,7 +82,9 @@ var redirectRegex = /^30(1|2|7|8)$/; */ function writeHeaders(req, res, proxyRes) { Object.keys(proxyRes.headers).forEach(function(key) { - res.setHeader(key, proxyRes.headers[key]); + if(proxyRes.headers[key] != undefined){ + res.setHeader(key, proxyRes.headers[key]); + } }); },