The embedded page loads correctly, but when the page inside the iframe attempts to open a new window, it still reports an error:
“Blocked opening ‘XXX’ in a new window because the request was made in a sandboxed frame whose ‘allow-popups’ permission is not set.”
How should I modify my code to resolve this issue?
Does this mean that if we enable allow-url using a wildcard (*), we can’t fine-tune access for specific URLs anymore — essentially making it an all-or-nothing setting ? Or is it only an issue with the manifest validation ?
Hi @julien , yes different categories cannot have overlapping egress domains. Addresses with the analytics category will allow an admin to optionally deny requests from that domain. But in this case, since you’re already allowing wildcard client addresses, having anything with the analytics scope won’t matter as your app is already allowing fetch requests from any domain.
Could you please clarify why an application that needs to open a pop-up from within an iframe is required to declare all domains (using a wildcard *) as potential egress, effectively preventing application users from disabling analytics?
Shouldn’t allow-popups be defined as a dedicated permission in the manifest, rather than being an indirect side effect of using a wildcard domain?
Sure, the challenge we faced with offering a separate control for the allow-popups directive is that it effectively enables users to open links or navigate to domains outside those specified in the manifest, introducing potential data egress without their consent. We no longer retain any control over this when allow-popups is applied. A wildcard domain captures this side effect and the risks that comes with the directive.
So, if we want to continue allowing users to disable analytics while still being able to open links in a new tab (for example, to access documentation without losing context), we have no choice but to avoid using wildcards and instead open links via router.open.
). That said, declaring a domain does not seem to prevent the warning from appearing when using router.open.
Why is there a distinction between router.navigate and router.open and why is it not possible to avoid this warning ? From my point of view, same egress rules should apply.
Hi @julien , yes allow-popup should generally be used if you want to allow for navigations or opening popups from within an iframe that your app has embedded and you have no control over that content. Otherwise, we recommend listing out domains in the manifest and using the router bridge methods.
Adding domains into external.fetch.client will ensure navigation will not trigger a warning modal. This applies to both router.navigate and router.open.