Problem
We are upgrading from 1905 to 2005.
When entering smartedit, a lot of messages "disallowed storefront is trying to communicate with smarteditcontainer" are printednin the browser console. This does occur immediately after login when browsing the catalogs and pages (so even before the spartacus storefront is involved when editing pages and using the preview functionality).
Description of the situation:
[ "https://localhost:4200" ]
1905:
/** * allowed if receiving end is frame or [container + (white listed storefront or same origin)] */ GatewayFactory.prototype._isAllowed = function (origin) { var _this = this; var whiteListedStorefronts = this.injector.get(GatewayFactory_1.WHITE_LISTED_STOREFRONTS_CONFIGURATION_KEY, []); return this.windowUtils.isIframe() || this.urlUtils.getOrigin() === origin || (whiteListedStorefronts.some(function (allowedURI) { return _this.stringUtils.regExpFactory(allowedURI).test(origin); })); }; var GatewayFactory_1; /** * @description * the name of the configuration key containing the list of white listed storefront domain names */ GatewayFactory.WHITE_LISTED_STOREFRONTS_CONFIGURATION_KEY = 'whiteListedStorefronts'; /*
2005:
/** * allowed if receiving end is frame or [container + (origin same as loaded iframe)] */ GatewayFactory.prototype._isAllowed = function (origin) { return ( // communication from container to iframe already secured by webApplicationInjector this.windowUtils.isIframe() || // communication from iframe to container strictly limiting to domain loaded in iframe this.windowUtils.getTrustedIframeDomain() === origin); }; var GatewayFactory_1; /*
Question:
How and where do we have to configure the access from http://localhost:9002 so that the _isAllowed in the 2005 version is not giving back "false" (and therefore the log messages do not happen)?