Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Commit

Permalink
fix: default host header to registry.npmjs.org
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Coe committed Nov 22, 2017
1 parent a677f62 commit 7ca1402
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ function CouchUrlRewriteProxy (opts) {
var payload = {
method: req.method,
url: url.resolve(opts.upstream, req.path),
headers: req.headers,
headers: Object.assign(req.headers, {
host: 'registry.npmjs.org'
}),
qs: req.query,
json: false,
strictSSL: false
Expand Down

0 comments on commit 7ca1402

Please sign in to comment.