Control who can frame an app

Let only chosen sites show an app inside an iframe, on every response and every domain of the app, without changing its code.

Last updated 30 November 2026View as Markdown

By default the platform adds no framing header, and the app decides with its own X-Frame-Options or Content-Security-Policy. Set frameAncestors and every response of the app carries Content-Security-Policy: frame-ancestors <your list>: on every domain of the app, for both hosting modes, the platform's own pages included (a kill switch's page, a pooled app's page while it starts). Replace app-id with the app's id.

What the setting means

frameAncestors Who may show the app in a frame
null (default) Whatever the app's own headers say
["'self'"] Only pages of the app's own origin
["'self'", "https://portal.example.com"] Those origins
["https://*.example.com"] Every subdomain of example.com on HTTPS
["'none'"] No one

At most 10 entries. An entry is 'self', 'none' (only on its own), or an https:// origin with an optional port and an optional *. as its leftmost label. A bare *, http:// origins, paths and an empty list are refused with 400; to allow anyone, leave the setting null.

While the setting is on, the app's own X-Frame-Options header is removed: browsers that know frame-ancestors ignore it anyway, and older ones then behave the same. The app's own Content-Security-Policy stays beside the platform's. A browser applies both, so the app can narrow the list (its own frame-ancestors 'none' still forbids every frame) but never widen it.

Set the list

  1. Open the app and choose Domains.
  2. Under Framing, choose Only these sites and enter the sites, one per line.
  3. Choose Save. Decided by the app turns the header off again.

The change needs deploy:UpdateApp on the app and no deployment. A pooled app's pool host applies it at its next pass, within seconds; an app's machines at their agent's next poll, within a minute.

Did this page help you?