mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
retrieving proxy values from environment if present
This commit is contained in:
parent
1df6d53612
commit
8f05e141c3
1 changed files with 7 additions and 0 deletions
|
@ -97,6 +97,13 @@ function Config(config) {
|
|||
check_userlist(i, this.packages[i], 'publish')
|
||||
}
|
||||
|
||||
// loading these from ENV if aren't in config
|
||||
;['http_proxy', 'https_proxy', 'no_proxy'].forEach((function(v) {
|
||||
if (!(v in this)) {
|
||||
this[v] = process.env[v] || process.env[v.toUpperCase()]
|
||||
}
|
||||
}).bind(this))
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue