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