Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add noproxy configuration #11

Closed
wants to merge 2 commits into from

1 participant

@vvision

As mentioned in this pull request npm/npm#2873, I've added noproxy configuration.
I think registry urls should now respect NO_PROXY if the registry is on that list.

However, tests are failing since this.conf.get('noproxy') cannot be retrieved yet.

Associated Pull Request:
npm/npm#2873
npm/npmconf#13

@vvision vvision closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 18, 2012
  1. @vvision

    Added noproxy configuration.

    vvision authored
Commits on Mar 19, 2013
  1. @vvision
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/request.js
View
6 lib/request.js
@@ -181,7 +181,11 @@ function makeRequest (method, remote, where, what, etag, nofollow, tok, cb_) {
var p = this.conf.get('proxy')
var sp = this.conf.get('https-proxy') || p
- opts.proxy = remote.protocol === "https:" ? sp : p
+ var np = this.conf.get('noproxy')
+
+ if(np.search(remote.hostname) === -1) {
+ opts.proxy = remote.protocol === "https:" ? sp : p
+ }
// figure out wth 'what' is
if (what) {
Something went wrong with that request. Please try again.