Why doesn’t the Portainer UI load inside an iframe?

By default, Portainer cannot be embedded in an iframe. This is because the default Content-Security-Policy (CSP) header includes:

frame-ancestors 'none';

This blocks all iframing of Portainer.

If you need to allow iframing, you can disable the CSP header entirely by setting the --no-csp flag when running Portainer.

Last updated

Was this helpful?