diff --git a/lib/node-http-proxy/http-proxy.js b/lib/node-http-proxy/http-proxy.js index bd8434a65349d98c1bc636b221136f0780c13fa0..6ac9b9ad0f7c2e4f9869543e56dc0c272eabb8fa 100644 --- a/lib/node-http-proxy/http-proxy.js +++ b/lib/node-http-proxy/http-proxy.js @@ -214,7 +214,15 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) { outgoing.agent = this.target.agent; outgoing.method = req.method; outgoing.path = req.url; - outgoing.headers = req.headers; + outgoing.headers = {}; + + for (var attr in req.headers) { + if(req.headers.hasOwnProperty(attr)) { + outgoing.headers[attr] = req.headers[attr]; + } + } + + // // Open new HTTP request to internal resource with will act