Skip to content

Commit 9aa906b

Browse files
committed
feat(config): support no-proxy and https-proxy options
1 parent 57da5cb commit 9aa906b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ module.exports = figgyPudding({
1919
'fetch-retry-mintimeout': {},
2020
'gid': {},
2121
'headers': {},
22+
'https-proxy': {},
2223
'integrity': {},
2324
'is-from-ci': 'isFromCI',
2425
'isFromCI': {
@@ -45,6 +46,7 @@ module.exports = figgyPudding({
4546
'method': {
4647
default: 'GET'
4748
},
49+
'no-proxy': {},
4850
'noproxy': {},
4951
'npm-session': 'npmSession',
5052
'npmSession': {},

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ function regFetch (uri, opts) {
6666
maxSockets: opts.get('maxsockets'),
6767
memoize: opts.get('memoize'),
6868
method: opts.get('method') || 'GET',
69-
noProxy: opts.get('noproxy'),
69+
noProxy: opts.get('no-proxy') || opts.get('noproxy'),
7070
Promise: opts.get('Promise'),
71-
proxy: opts.get('proxy'),
71+
proxy: opts.get('https-proxy') || opts.get('proxy'),
7272
referer: opts.get('refer'),
7373
retry: opts.get('retry') || {
7474
retries: opts.get('fetch-retries'),

0 commit comments

Comments
 (0)