ts-aspnetcore-apigateway-client
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -54,24 +54,23 @@ "use strict"; | ||
} | ||
if (this._settings.UseHttps) { | ||
if (this._settings.IsDEVMode) { | ||
var https = require('https'); | ||
if (this._settings.IsDEVMode) { | ||
this._httpsAgent = new https.Agent({ | ||
rejectUnauthorized: false, | ||
requestCert: true, | ||
agent: false | ||
}); | ||
} | ||
else { | ||
this._httpsAgent = new https.Agent({ | ||
rejectUnauthorized: false, | ||
requestCert: true, | ||
agent: false | ||
}); | ||
} | ||
else { | ||
if (this._settings.UseCertificate && this._settings.CertificateSettings) { | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
if (this._settings.UseCertificate && this._settings.CertificateSettings) { | ||
var options = { | ||
cert: fs.readFileSync(path.resolve(__dirname, this._settings.CertificateSettings.PfxPath), "utf-8"), | ||
key: fs.readFileSync(path.resolve(__dirname, this._settings.CertificateSettings.PrivateKeyPath), 'utf-8'), | ||
passphrase: this._settings.CertificateSettings.Passphrase, | ||
rejectUnauthorized: true, | ||
keepAlive: true, | ||
}; | ||
this._httpsAgent = new https.Agent(options); | ||
} | ||
var options = { | ||
cert: fs.readFileSync(path.resolve(__dirname, this._settings.CertificateSettings.PfxPath), "utf-8"), | ||
key: fs.readFileSync(path.resolve(__dirname, this._settings.CertificateSettings.PrivateKeyPath), 'utf-8'), | ||
passphrase: this._settings.CertificateSettings.Passphrase, | ||
rejectUnauthorized: true, | ||
keepAlive: true, | ||
}; | ||
var https = require('https'); | ||
this._httpsAgent = new https.Agent(options); | ||
} | ||
@@ -78,0 +77,0 @@ } |
export declare class ApiGatewayClientSettings { | ||
ApiGatewayBaseUrl?: string; | ||
IsDEVMode?: boolean; | ||
UseHttps?: boolean; | ||
UseCertificate?: boolean; | ||
@@ -6,0 +5,0 @@ CertificateSettings?: CertificateSettings; |
{ | ||
"name": "ts-aspnetcore-apigateway-client", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "TypeScript Client for Api Gateway built using AspNetCore.ApiGateway package.", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
24970
478
2