mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-08 23:25:51 +01:00
fix: allow add to request agentOptions (#1506)
Follow up of https://github.com/verdaccio/verdaccio/pull/1332 Documented here https://github.com/verdaccio/website/pull/126
This commit is contained in:
parent
52130704ec
commit
65d6a935b5
@ -41,6 +41,7 @@ class ProxyStorage implements IProxy {
|
||||
public timeout: number;
|
||||
public max_fails: number;
|
||||
public fail_timeout: number;
|
||||
public agent_options: any;
|
||||
// FIXME: upname is assigned to each instance
|
||||
// @ts-ignore
|
||||
public upname: string;
|
||||
@ -87,6 +88,7 @@ class ProxyStorage implements IProxy {
|
||||
this.max_fails = Number(setConfig(this.config, 'max_fails', 2));
|
||||
this.fail_timeout = parseInterval(setConfig(this.config, 'fail_timeout', '5m'));
|
||||
this.strict_ssl = Boolean(setConfig(this.config, 'strict_ssl', true));
|
||||
this.agent_options = setConfig(this.config, 'agent_options', {});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -200,12 +202,12 @@ class ProxyStorage implements IProxy {
|
||||
method: method,
|
||||
headers: headers,
|
||||
body: json,
|
||||
// FIXME: ts complains ca cannot be undefined
|
||||
proxy: this.proxy,
|
||||
encoding: null,
|
||||
gzip: true,
|
||||
timeout: this.timeout,
|
||||
strictSSL: this.strict_ssl,
|
||||
agentOptions: this.agent_options,
|
||||
};
|
||||
|
||||
if (this.ca) {
|
||||
|
Loading…
Reference in New Issue
Block a user