Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

Commit

Permalink
Merge pull request #298 from sshen/master
Browse files Browse the repository at this point in the history
Default to user agent string in npm config if it is provided
  • Loading branch information
nicks committed Feb 18, 2015
2 parents 4bbb405 + 6682c9b commit ee50305
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ function getRequestOptions(conf) {
// Enable proxy
options.proxy = proxyUrl

// If going through proxy, spoof the User-Agent, since may commerical proxies block blank or unknown agents in headers
options.headers['User-Agent'] = 'curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5'
// If going through proxy, use the user-agent string from the npm config
options.headers['User-Agent'] = conf.get('user-agent')
}

// Use certificate authority settings from npm
Expand Down

0 comments on commit ee50305

Please sign in to comment.