Skip to content

Commit 21397f4

Browse files
committed
should fix #24
1 parent 79fcee6 commit 21397f4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

api/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,13 @@ export class AtelierAPI {
9696
}
9797
headers['Cache-Control'] = 'no-cache';
9898

99-
const { host, port, username, password } = this._config;
99+
const { host, port, username, password, https } = this._config;
100100
const http: any = this._config.https ? httpsModule : httpModule;
101-
const agent = new http.Agent({ keepAlive: true, maxSockets: 10 });
101+
const agent = new http.Agent({
102+
keepAlive: true,
103+
maxSockets: 10,
104+
rejectUnauthorized: https && config('http.proxyStrictSSL')
105+
});
102106
path = encodeURI(`/api/atelier/${path || ''}${buildParams()}`);
103107

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

0 commit comments

Comments
 (0)