@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 CHANGED
@@ -1,3 +1,9 @@
1
+ ## 2.10.0 (2025-09-14)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **ignoreProxyUrlParams:** Added ignoreProxyUrlParams, which provides the ability to skip appending the Coralogix endpoint to the proxy URL.
6
+
1
7
  ## 2.9.0 (2025-08-18)
2
8
 
3
9
  ### 🚀 Features
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 _b = this.requestConfig, suffix = _b.suffix, headers = _b.headers;
3268
- var cxEndpoint = "".concat(CoralogixDomainsApiUrlMap[coralogixDomain]).concat(suffix);
3269
- this.resolvedUrl = proxyUrl
3270
- ? "".concat(proxyUrl, "?").concat(PROXY_CX_FORWARD_PARAMETER, "=").concat(encodeURIComponent(cxEndpoint))
3271
- : cxEndpoint;
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.9.0';
3968
+ var SDK_VERSION = '2.10.0';
3959
3969
 
3960
3970
  function shouldDropEvent(cxRumEvent, options) {
3961
3971
  if (isDocumentErrorWithoutMessage(cxRumEvent)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coralogix/browser",
3
- "version": "2.9.0",
3
+ "version": "2.10.0",
4
4
  "description": "Official Coralogix SDK for browsers",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Coralogix",
package/src/Request.d.ts CHANGED
@@ -7,6 +7,7 @@ export declare class Request {
7
7
  private resolvedUrl;
8
8
  private resolvedHeaders;
9
9
  constructor(requestConfig: RequestConfig);
10
+ private getResolvedUrl;
10
11
  private init;
11
12
  send(body: BodyInit): Promise<Response>;
12
13
  }
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.9.0";
1
+ export declare const SDK_VERSION = "2.10.0";