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

Default to user agent string in npm config if it is provided #298

Merged
merged 2 commits into from
Feb 18, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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