@ceon-oy/monitor-sdk 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -96,7 +96,8 @@ var MonitorClient = class {
|
|
|
96
96
|
if (!["https:", "http:"].includes(url.protocol)) {
|
|
97
97
|
throw new Error("[MonitorClient] Endpoint must use HTTP or HTTPS protocol");
|
|
98
98
|
}
|
|
99
|
-
|
|
99
|
+
const devEnvironments = ["development", "dev", "test", "local"];
|
|
100
|
+
if (url.protocol === "http:" && !devEnvironments.includes(config.environment || "")) {
|
|
100
101
|
if (!config.allowInsecureHttp) {
|
|
101
102
|
throw new Error("[MonitorClient] HTTP endpoints require allowInsecureHttp: true in non-development environments");
|
|
102
103
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -60,7 +60,8 @@ var MonitorClient = class {
|
|
|
60
60
|
if (!["https:", "http:"].includes(url.protocol)) {
|
|
61
61
|
throw new Error("[MonitorClient] Endpoint must use HTTP or HTTPS protocol");
|
|
62
62
|
}
|
|
63
|
-
|
|
63
|
+
const devEnvironments = ["development", "dev", "test", "local"];
|
|
64
|
+
if (url.protocol === "http:" && !devEnvironments.includes(config.environment || "")) {
|
|
64
65
|
if (!config.allowInsecureHttp) {
|
|
65
66
|
throw new Error("[MonitorClient] HTTP endpoints require allowInsecureHttp: true in non-development environments");
|
|
66
67
|
}
|
package/package.json
CHANGED