Skip to content

Commit

Permalink
[cleanup] simpler shallow copy
Browse files Browse the repository at this point in the history
  • Loading branch information
doublerebel committed Apr 9, 2016
1 parent e83f624 commit ca3918a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/npm-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -714,11 +714,7 @@ NpmProxy.prototype.merge = function (req, res, policy) {
// specified target.
//
function makeRequest(target, type) {
var headers = Object.keys(req.headers)
.reduce(function (all, key) {
all[key] = req.headers[key];
return all;
}, {});
var headers = util._extend({}, req.headers);

// if we receieve a combo auth Basic+Bearer, parse it
if (type === 'private') self.parseBasicIfComboToken(headers);
Expand Down

0 comments on commit ca3918a

Please sign in to comment.