Skip to content

Commit

Permalink
Added check to passes/web-outgoing.js to make sure the header being s…
Browse files Browse the repository at this point in the history
…et is not undefined, which should be the only falsey value that could accidently show up and break that call. This fixes windows NTLM auth issues behind http-proxy.
  • Loading branch information
merpnderp committed Jan 22, 2016
1 parent 6371231 commit 3b39d2c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/http-proxy/passes/web-outgoing.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
});
},

Expand Down

0 comments on commit 3b39d2c

Please sign in to comment.