Skip to content

Commit

Permalink
fix: allow add to request agentOptions (#1506)
Browse files Browse the repository at this point in the history
Follow up of #1332
Documented here verdaccio/website#126
  • Loading branch information
juanpicado authored Oct 3, 2019
1 parent 5213070 commit 65d6a93
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/up-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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', {});
}

/**
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 65d6a93

Please sign in to comment.