@coralogix/browser 2.9.0 → 2.10.0
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/CHANGELOG.md +6 -0
- package/README.md +12 -0
- package/index.esm2.js +17 -7
- package/package.json +1 -1
- package/src/Request.d.ts +1 -0
- package/src/types.d.ts +1 -0
- package/src/version.d.ts +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -696,6 +696,18 @@ CoralogixRum.init({
|
|
|
696
696
|
});
|
|
697
697
|
```
|
|
698
698
|
|
|
699
|
+
#### ignoreProxyUrlParams
|
|
700
|
+
If you want the SDK to ignore the cxforward parameter and always send data to the proxy URL directly, you can use the ignoreProxyUrlParams option.
|
|
701
|
+
By default, this option is disabled.
|
|
702
|
+
```javascript
|
|
703
|
+
CoralogixRum.init({
|
|
704
|
+
// ...
|
|
705
|
+
coralogixDomain: 'EU1',
|
|
706
|
+
proxyUrl: 'https://proxy.mycompany.com/rum',
|
|
707
|
+
ignoreProxyUrlParams: true,
|
|
708
|
+
});
|
|
709
|
+
```
|
|
710
|
+
|
|
699
711
|
### Collect IP Data
|
|
700
712
|
|
|
701
713
|
Determines whether the SDK should collect the user's IP address and corresponding geolocation data. Defaults to true.
|
package/index.esm2.js
CHANGED
|
@@ -3262,13 +3262,23 @@ var Request = (function () {
|
|
|
3262
3262
|
this.resolvedHeaders = {};
|
|
3263
3263
|
this.init();
|
|
3264
3264
|
}
|
|
3265
|
+
Request.prototype.getResolvedUrl = function (config) {
|
|
3266
|
+
var coralogixDomain = config.coralogixDomain, proxyUrl = config.proxyUrl, ignoreProxyUrlParams = config.ignoreProxyUrlParams;
|
|
3267
|
+
var cxEndpoint = "".concat(CoralogixDomainsApiUrlMap[coralogixDomain]).concat(this.requestConfig.suffix);
|
|
3268
|
+
if (!proxyUrl)
|
|
3269
|
+
return cxEndpoint;
|
|
3270
|
+
if (ignoreProxyUrlParams)
|
|
3271
|
+
return proxyUrl;
|
|
3272
|
+
return "".concat(proxyUrl, "?").concat(PROXY_CX_FORWARD_PARAMETER, "=").concat(encodeURIComponent(cxEndpoint));
|
|
3273
|
+
};
|
|
3265
3274
|
Request.prototype.init = function () {
|
|
3266
|
-
var _a = getSdkConfig(), proxyUrl = _a.proxyUrl, coralogixDomain = _a.coralogixDomain, public_key = _a.public_key;
|
|
3267
|
-
var
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
:
|
|
3275
|
+
var _a = getSdkConfig(), proxyUrl = _a.proxyUrl, ignoreProxyUrlParams = _a.ignoreProxyUrlParams, coralogixDomain = _a.coralogixDomain, public_key = _a.public_key;
|
|
3276
|
+
var headers = this.requestConfig.headers;
|
|
3277
|
+
this.resolvedUrl = this.getResolvedUrl({
|
|
3278
|
+
proxyUrl: proxyUrl,
|
|
3279
|
+
ignoreProxyUrlParams: ignoreProxyUrlParams,
|
|
3280
|
+
coralogixDomain: coralogixDomain,
|
|
3281
|
+
});
|
|
3272
3282
|
if (public_key) {
|
|
3273
3283
|
headers['Authorization'] = "Bearer ".concat(public_key);
|
|
3274
3284
|
}
|
|
@@ -3955,7 +3965,7 @@ function resolveUrlBlueprinters(urlBlueprinters) {
|
|
|
3955
3965
|
return resolvedUrlBlueprinters;
|
|
3956
3966
|
}
|
|
3957
3967
|
|
|
3958
|
-
var SDK_VERSION = '2.
|
|
3968
|
+
var SDK_VERSION = '2.10.0';
|
|
3959
3969
|
|
|
3960
3970
|
function shouldDropEvent(cxRumEvent, options) {
|
|
3961
3971
|
if (isDocumentErrorWithoutMessage(cxRumEvent)) {
|
package/package.json
CHANGED
package/src/Request.d.ts
CHANGED
package/src/types.d.ts
CHANGED
|
@@ -149,6 +149,7 @@ export interface CoralogixBrowserSdkConfig {
|
|
|
149
149
|
maskClass?: string | RegExp;
|
|
150
150
|
beforeSend?: (event: EditableCxRumEvent) => BeforeSendResult;
|
|
151
151
|
proxyUrl?: string;
|
|
152
|
+
ignoreProxyUrlParams?: boolean;
|
|
152
153
|
collectIPData?: boolean;
|
|
153
154
|
trackSoftNavigations?: boolean;
|
|
154
155
|
memoryUsageConfig?: MemoryUsageConfig;
|
package/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.
|
|
1
|
+
export declare const SDK_VERSION = "2.10.0";
|