@kush_hemant/react-api-monitor 1.0.35 → 1.0.37
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 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -41,7 +41,7 @@ function monitorFetch() {
|
|
|
41
41
|
const request = args[0] instanceof Request ? args[0] : new Request(args[0], args[1]);
|
|
42
42
|
const url = request.url;
|
|
43
43
|
const method = request.method || "GET";
|
|
44
|
-
if (LOG_ENDPOINT && url.
|
|
44
|
+
if (LOG_ENDPOINT && url.includes("/v1/logs")) {
|
|
45
45
|
return originalFetch.apply(this, args);
|
|
46
46
|
}
|
|
47
47
|
let requestBody = null;
|
|
@@ -94,7 +94,7 @@ function monitorXHR() {
|
|
|
94
94
|
};
|
|
95
95
|
XMLHttpRequest.prototype.send = function(body) {
|
|
96
96
|
const start = Date.now();
|
|
97
|
-
if (this._url && LOG_ENDPOINT && this._url.includes(
|
|
97
|
+
if (this._url && LOG_ENDPOINT && this._url.includes("/v1/logs")) {
|
|
98
98
|
return originalSend.call(this, body);
|
|
99
99
|
}
|
|
100
100
|
this.addEventListener("loadend", () => {
|