@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.esm.js CHANGED
@@ -1285,6 +1285,15 @@ class MessageBroker {
1285
1285
  this.logger = logger.child('[MessageBroker]');
1286
1286
  this.iframeManager = iframeManager;
1287
1287
  this.security = new SecurityManager(config.security, this.logger);
1288
+ // Automatically trust messages from the widget's base URL
1289
+ // The iframes load from api.baseUrl, so we must accept their postMessages
1290
+ try {
1291
+ const widgetOrigin = new URL(config.api.baseUrl).origin;
1292
+ this.security.addAllowedOrigin(widgetOrigin);
1293
+ }
1294
+ catch {
1295
+ // Invalid URL, will rely on configured allowedOrigins
1296
+ }
1288
1297
  this.rateLimiter = new RateLimiter(100, 60000); // 100 messages per minute
1289
1298
  // Bind handlers once for proper cleanup
1290
1299
  this.boundHandleMessage = this.handleMessage.bind(this);
@@ -2390,7 +2399,7 @@ class StateCoordinator {
2390
2399
  }
2391
2400
  }
2392
2401
 
2393
- var version = "1.0.13";
2402
+ var version = "1.0.14";
2394
2403
  var packageJson = {
2395
2404
  version: version};
2396
2405