Skip to content

Commit

Permalink
feat(config): support no-proxy and https-proxy options
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Apr 9, 2018
1 parent 57da5cb commit 9aa906b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = figgyPudding({
'fetch-retry-mintimeout': {},
'gid': {},
'headers': {},
'https-proxy': {},
'integrity': {},
'is-from-ci': 'isFromCI',
'isFromCI': {
Expand All @@ -45,6 +46,7 @@ module.exports = figgyPudding({
'method': {
default: 'GET'
},
'no-proxy': {},
'noproxy': {},
'npm-session': 'npmSession',
'npmSession': {},
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ function regFetch (uri, opts) {
maxSockets: opts.get('maxsockets'),
memoize: opts.get('memoize'),
method: opts.get('method') || 'GET',
noProxy: opts.get('noproxy'),
noProxy: opts.get('no-proxy') || opts.get('noproxy'),
Promise: opts.get('Promise'),
proxy: opts.get('proxy'),
proxy: opts.get('https-proxy') || opts.get('proxy'),
referer: opts.get('refer'),
retry: opts.get('retry') || {
retries: opts.get('fetch-retries'),
Expand Down

0 comments on commit 9aa906b

Please sign in to comment.