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