Skip to content

Commit

Permalink
Remove HTTP Referer header config
Browse files Browse the repository at this point in the history
Last bit of #930
  • Loading branch information
isaacs committed May 8, 2020
1 parent 7df93b7 commit b716547
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 41 deletions.
18 changes: 0 additions & 18 deletions lib/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@
return littleGuys.indexOf(c) === -1
})

var registryRefer

Object.keys(abbrevs).concat(plumbing).forEach(function addCommand (c) {
Object.defineProperty(npm.commands, c, { get: function () {
if (!loaded) {
Expand Down Expand Up @@ -140,22 +138,6 @@
}
})

if (!registryRefer) {
registryRefer = [a].concat(args[0]).map(function (arg) {
// exclude anything that might be a URL, path, or private module
// Those things will always have a slash in them somewhere
if (arg && arg.match && arg.match(/\/|\\/)) {
return '[REDACTED]'
} else {
return arg
}
}).filter(function (arg) {
return arg && arg.match
}).join(' ')
npm.referer = registryRefer
npm.config.set('refer', npm.referer)
}

cmd.apply(npm, args)
}

Expand Down
23 changes: 0 additions & 23 deletions test/tap/referer.js

This file was deleted.

0 comments on commit b716547

Please sign in to comment.