0
Fork 0
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:
Alex Kocharin 2013-11-24 21:08:20 +04:00
parent 1df6d53612
commit 8f05e141c3

View file

@ -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
}