Skip to content

Commit

Permalink
Merge pull request #940 from merpnderp/FixSetHeader
Browse files Browse the repository at this point in the history
Added check to passes/web-outgoing.js to make sure the header being s…
  • Loading branch information
jcrugzz committed Jan 23, 2016
2 parents 6371231 + 3b39d2c commit 646a749
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 646a749

Please sign in to comment.