elastic-apm-http-client
Advanced tools
Comparing version 7.0.1 to 7.0.2
17
index.js
@@ -72,3 +72,18 @@ 'use strict' | ||
this._onflushed = null | ||
this._transport = require(opts.serverUrl.protocol.slice(0, -1)) // 'http:' => 'http' | ||
this._transport = null | ||
switch (opts.serverUrl.protocol.slice(0, -1)) { // 'http:' => 'http' | ||
case 'http': { | ||
this._transport = require('http') | ||
break | ||
} | ||
case 'https': { | ||
this._transport = require('https') | ||
break | ||
} | ||
default: { | ||
throw new Error('Unknown protocol ' + opts.serverUrl.protocol.slice(0, -1)) | ||
} | ||
} | ||
this._agent = new this._transport.Agent(opts) | ||
@@ -75,0 +90,0 @@ this._chopper = new StreamChopper({ |
{ | ||
"name": "elastic-apm-http-client", | ||
"version": "7.0.1", | ||
"version": "7.0.2", | ||
"description": "A low-level HTTP client for communicating with the Elastic APM intake API", | ||
@@ -52,5 +52,5 @@ "main": "index.js", | ||
"coordinates": [ | ||
55.778248, | ||
12.593108 | ||
55.778267, | ||
12.593169 | ||
] | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
34799
688
1
2