Skip to content

Commit

Permalink
should fix #24
Browse files Browse the repository at this point in the history
  • Loading branch information
daimor committed Apr 18, 2019
1 parent 79fcee6 commit 21397f4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,13 @@ export class AtelierAPI {
}
headers['Cache-Control'] = 'no-cache';

const { host, port, username, password } = this._config;
const { host, port, username, password, https } = this._config;
const http: any = this._config.https ? httpsModule : httpModule;
const agent = new http.Agent({ keepAlive: true, maxSockets: 10 });
const agent = new http.Agent({
keepAlive: true,
maxSockets: 10,
rejectUnauthorized: https && config('http.proxyStrictSSL')
});
path = encodeURI(`/api/atelier/${path || ''}${buildParams()}`);

if (headers['Content-Type'] && headers['Content-Type'].includes('json')) {
Expand Down

0 comments on commit 21397f4

Please sign in to comment.