@weldsuite/helpdesk-widget-sdk 1.0.13 → 1.0.15
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/angular.esm.js +11 -6
- package/dist/angular.esm.js.map +1 -1
- package/dist/angular.js +11 -6
- package/dist/angular.js.map +1 -1
- package/dist/index.esm.js +11 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +11 -6
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +11 -6
- package/dist/index.umd.js.map +1 -1
- package/dist/react.esm.js +11 -6
- package/dist/react.esm.js.map +1 -1
- package/dist/react.js +11 -6
- package/dist/react.js.map +1 -1
- package/dist/vue-composables.esm.js +11 -6
- package/dist/vue-composables.esm.js.map +1 -1
- package/dist/vue-composables.js +11 -6
- package/dist/vue-composables.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1027,11 +1027,7 @@ class SecurityManager {
|
|
|
1027
1027
|
* Validate message origin
|
|
1028
1028
|
*/
|
|
1029
1029
|
isOriginAllowed(origin) {
|
|
1030
|
-
//
|
|
1031
|
-
if (this.config.allowedOrigins?.length === 0) {
|
|
1032
|
-
return origin === window.location.origin;
|
|
1033
|
-
}
|
|
1034
|
-
// Check if origin is in allowed list
|
|
1030
|
+
// Check if origin is in allowed list (includes same-origin and programmatically added origins)
|
|
1035
1031
|
if (this.allowedOrigins.has(origin)) {
|
|
1036
1032
|
return true;
|
|
1037
1033
|
}
|
|
@@ -1289,6 +1285,15 @@ class MessageBroker {
|
|
|
1289
1285
|
this.logger = logger.child('[MessageBroker]');
|
|
1290
1286
|
this.iframeManager = iframeManager;
|
|
1291
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
|
+
}
|
|
1292
1297
|
this.rateLimiter = new RateLimiter(100, 60000); // 100 messages per minute
|
|
1293
1298
|
// Bind handlers once for proper cleanup
|
|
1294
1299
|
this.boundHandleMessage = this.handleMessage.bind(this);
|
|
@@ -2394,7 +2399,7 @@ class StateCoordinator {
|
|
|
2394
2399
|
}
|
|
2395
2400
|
}
|
|
2396
2401
|
|
|
2397
|
-
var version = "1.0.
|
|
2402
|
+
var version = "1.0.15";
|
|
2398
2403
|
var packageJson = {
|
|
2399
2404
|
version: version};
|
|
2400
2405
|
|