Skip to content

Commit b716547

Browse files
committed
Remove HTTP Referer header config
Last bit of #930
1 parent 7df93b7 commit b716547

File tree

2 files changed

+0
-41
lines changed

2 files changed

+0
-41
lines changed

lib/npm.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@
103103
return littleGuys.indexOf(c) === -1
104104
})
105105

106-
var registryRefer
107-
108106
Object.keys(abbrevs).concat(plumbing).forEach(function addCommand (c) {
109107
Object.defineProperty(npm.commands, c, { get: function () {
110108
if (!loaded) {
@@ -140,22 +138,6 @@
140138
}
141139
})
142140

143-
if (!registryRefer) {
144-
registryRefer = [a].concat(args[0]).map(function (arg) {
145-
// exclude anything that might be a URL, path, or private module
146-
// Those things will always have a slash in them somewhere
147-
if (arg && arg.match && arg.match(/\/|\\/)) {
148-
return '[REDACTED]'
149-
} else {
150-
return arg
151-
}
152-
}).filter(function (arg) {
153-
return arg && arg.match
154-
}).join(' ')
155-
npm.referer = registryRefer
156-
npm.config.set('refer', npm.referer)
157-
}
158-
159141
cmd.apply(npm, args)
160142
}
161143

test/tap/referer.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)