Skip to content

Commit

Permalink
Sanitize header keys before setting them (#997)
Browse files Browse the repository at this point in the history
Fixes #996.
  • Loading branch information
randunel authored and jcrugzz committed Apr 26, 2016
1 parent b223275 commit 284903d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/http-proxy/passes/web-outgoing.js
Expand Up @@ -83,7 +83,7 @@ var redirectRegex = /^30(1|2|7|8)$/;
function writeHeaders(req, res, proxyRes) {
Object.keys(proxyRes.headers).forEach(function(key) {
if(proxyRes.headers[key] != undefined){
res.setHeader(key, proxyRes.headers[key]);
res.setHeader(String(key).trim(), proxyRes.headers[key]);
}
});
},
Expand Down

0 comments on commit 284903d

Please sign in to comment.