@creatdevsolutions/bundesstrasse
Advanced tools
Comparing version 18.10.17 to 18.10.18
@@ -111,7 +111,7 @@ /////////////////////////////////////////////////////////////////////////////// | ||
var options = { | ||
var options = { | ||
agent : self._options.agent, | ||
headers : self._options.headers | ||
}; | ||
var protocols; | ||
@@ -126,6 +126,15 @@ if (self._options.protocols) { | ||
if (self._options.url.startsWith('wss://')) { | ||
if ( | ||
self._options.url.startsWith('wss://') && | ||
self._options.tlsConfiguration && | ||
self._options.tlsConfiguration.ca && | ||
self._options.tlsConfiguration.cert && | ||
self._options.tlsConfiguration.key | ||
) { | ||
// Using TLS | ||
// Only using the known working flags in the options. | ||
// https://nodejs.org/api/https.html#https_https_request_options_callback | ||
log.debug('Using TLS Client Authentication.'); | ||
options.ca = self._options.tlsConfiguration.ca; | ||
@@ -135,4 +144,6 @@ options.cert = self._options.tlsConfiguration.cert; | ||
options.rejectUnauthorized = false; | ||
} else { | ||
log.debug('Not using TLS Client Authentication.'); | ||
} | ||
websocket = new WebSocket(self._options.url, protocols, options); | ||
@@ -139,0 +150,0 @@ |
{ | ||
"name": "@creatdevsolutions/bundesstrasse", | ||
"version": "18.10.17", | ||
"version": "18.10.18", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "registry": "https://registry.npmjs.com", |
395860
7780