Include rejectUnauthorized in options
This commit is contained in:
parent
0d58557cac
commit
5d2d5ef024
@ -15,6 +15,7 @@ function RpcClient(opts) {
|
|||||||
this.protocol = (opts.protocol == 'http') ? http : https;
|
this.protocol = (opts.protocol == 'http') ? http : https;
|
||||||
this.batchedCalls = null;
|
this.batchedCalls = null;
|
||||||
this.disableAgent = opts.disableAgent || false;
|
this.disableAgent = opts.disableAgent || false;
|
||||||
|
this.rejectUnauthorized = opts.rejectUnauthorized || false;
|
||||||
}
|
}
|
||||||
|
|
||||||
RpcClient.prototype.batch = function(batchCallback, resultCallback) {
|
RpcClient.prototype.batch = function(batchCallback, resultCallback) {
|
||||||
@ -163,7 +164,7 @@ function rpc(request, callback) {
|
|||||||
path: '/',
|
path: '/',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
port: self.port,
|
port: self.port,
|
||||||
rejectUnauthorized: false,
|
rejectUnauthorized: self.rejectUnauthorized,
|
||||||
agent: self.disableAgent ? false : undefined,
|
agent: self.disableAgent ? false : undefined,
|
||||||
};
|
};
|
||||||
if (self.httpOptions) {
|
if (self.httpOptions) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user