Skip to content

Commit 3b39d2c

Browse files
committed
Added check to passes/web-outgoing.js to make sure the header being set 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.
1 parent 6371231 commit 3b39d2c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/http-proxy/passes/web-outgoing.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ var redirectRegex = /^30(1|2|7|8)$/;
8282
*/
8383
function writeHeaders(req, res, proxyRes) {
8484
Object.keys(proxyRes.headers).forEach(function(key) {
85-
res.setHeader(key, proxyRes.headers[key]);
85+
if(proxyRes.headers[key] != undefined){
86+
res.setHeader(key, proxyRes.headers[key]);
87+
}
8688
});
8789
},
8890

0 commit comments

Comments
 (0)