@weldsuite/helpdesk-widget-sdk 1.0.13 → 1.0.14

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.umd.js CHANGED
@@ -1291,6 +1291,15 @@
1291
1291
  this.logger = logger.child('[MessageBroker]');
1292
1292
  this.iframeManager = iframeManager;
1293
1293
  this.security = new SecurityManager(config.security, this.logger);
1294
+ // Automatically trust messages from the widget's base URL
1295
+ // The iframes load from api.baseUrl, so we must accept their postMessages
1296
+ try {
1297
+ const widgetOrigin = new URL(config.api.baseUrl).origin;
1298
+ this.security.addAllowedOrigin(widgetOrigin);
1299
+ }
1300
+ catch {
1301
+ // Invalid URL, will rely on configured allowedOrigins
1302
+ }
1294
1303
  this.rateLimiter = new RateLimiter(100, 60000); // 100 messages per minute
1295
1304
  // Bind handlers once for proper cleanup
1296
1305
  this.boundHandleMessage = this.handleMessage.bind(this);
@@ -2396,7 +2405,7 @@
2396
2405
  }
2397
2406
  }
2398
2407
 
2399
- var version = "1.0.13";
2408
+ var version = "1.0.14";
2400
2409
  var packageJson = {
2401
2410
  version: version};
2402
2411