@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.
@@ -1308,6 +1308,15 @@ class MessageBroker {
1308
1308
  this.logger = logger.child('[MessageBroker]');
1309
1309
  this.iframeManager = iframeManager;
1310
1310
  this.security = new SecurityManager(config.security, this.logger);
1311
+ // Automatically trust messages from the widget's base URL
1312
+ // The iframes load from api.baseUrl, so we must accept their postMessages
1313
+ try {
1314
+ const widgetOrigin = new URL(config.api.baseUrl).origin;
1315
+ this.security.addAllowedOrigin(widgetOrigin);
1316
+ }
1317
+ catch {
1318
+ // Invalid URL, will rely on configured allowedOrigins
1319
+ }
1311
1320
  this.rateLimiter = new RateLimiter(100, 60000); // 100 messages per minute
1312
1321
  // Bind handlers once for proper cleanup
1313
1322
  this.boundHandleMessage = this.handleMessage.bind(this);
@@ -2243,7 +2252,7 @@ class StateCoordinator {
2243
2252
  }
2244
2253
  }
2245
2254
 
2246
- var version = "1.0.13";
2255
+ var version = "1.0.14";
2247
2256
  var packageJson = {
2248
2257
  version: version};
2249
2258