@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.
@@ -1250,6 +1250,15 @@ class MessageBroker {
1250
1250
  this.logger = logger.child('[MessageBroker]');
1251
1251
  this.iframeManager = iframeManager;
1252
1252
  this.security = new SecurityManager(config.security, this.logger);
1253
+ // Automatically trust messages from the widget's base URL
1254
+ // The iframes load from api.baseUrl, so we must accept their postMessages
1255
+ try {
1256
+ const widgetOrigin = new URL(config.api.baseUrl).origin;
1257
+ this.security.addAllowedOrigin(widgetOrigin);
1258
+ }
1259
+ catch {
1260
+ // Invalid URL, will rely on configured allowedOrigins
1261
+ }
1253
1262
  this.rateLimiter = new RateLimiter(100, 60000); // 100 messages per minute
1254
1263
  // Bind handlers once for proper cleanup
1255
1264
  this.boundHandleMessage = this.handleMessage.bind(this);
@@ -2185,7 +2194,7 @@ class StateCoordinator {
2185
2194
  }
2186
2195
  }
2187
2196
 
2188
- var version = "1.0.13";
2197
+ var version = "1.0.14";
2189
2198
  var packageJson = {
2190
2199
  version: version};
2191
2200