React App Builder: iframes inherit the app sandbox without allow-same-origin, so embedded dashboards render blank even with a custom frame-src CSP rule

Summary

On self-hosted Retool 4.86.0, an app rebuilt in the new React app builder renders an embedded Metabase static-embed dashboard blank: the app document is served with a CSP sandbox directive lacking allow-same-origin, which nested iframes inherit (opaque origin), so the embed fails even after adding the Metabase origin to a custom frame-src rule.

AI Response

This behavior is expected. New app builder apps are governed by an org-wide Content Security Policy, and the custom CSP feature only lets admins add source expressions to a fixed set of directives (script-src, connect-src, frame-src, style-src, worker-src, form-action, frame-ancestors, and img/font/media-src). The document sandbox directive is not among the configurable directives, and Retool-enforced ('Required') rules cannot be changed, so there is currently no org-level or self-hosted setting to add allow-same-origin to the app sandbox or to grant per-origin sandbox exceptions for trusted BI embeds — unlike the classic IFrame component's 'Allow same origin' option. Adding the Metabase origin to frame-src is the correct and only exposed control, but it does not override the inherited sandbox flags. There is no documented workaround to restore allow-same-origin for nested iframes in new builder apps today; this gap can be tracked via the related community threads below, where Retool product staff have been iterating on CSP/embedding flexibility for the new builder.

Sources

:bookmark: Customize the Content Security Policy for apps | Retool Docs
Authoritative list of exactly which CSP directives admins can customize for new builder apps (Cloud and self-hosted) — frame-src is included but the sandbox directive is not, and Required rules can't be changed.
:bookmark: New React App Builder Iframe CSP Settings
Solved thread where Retool staff introduce the customizable CSP (frame-src allowlisting) for new builder apps, confirming it is the intended mechanism for permitting external iframe domains.

The Community Team is testing out a new automation. Let us know if it's helpful (or not) by leaving a :heart:, :+1:, or :-1:. Or by marking this post as the "Solution"! Let us know if you have any feedback here. :rocket: