diff --git a/SUMMARY.md b/SUMMARY.md index 0f742796..0325b83a 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -382,6 +382,7 @@ * [Unable to Authenticate After Portainer Update](faqs/troubleshooting/unable-to-authenticate-after-portainer-update.md) * [How do I recover orphaned stacks from a previously deleted environment?](faqs/troubleshooting/how-do-i-recover-orphaned-stacks-from-a-previously-deleted-environment.md) * [How do I change the way I connect to an environment without losing my existing stacks?](faqs/troubleshooting/how-do-i-change-the-way-i-connect-to-an-environment-without-losing-my-existing-stacks.md) + * [Why doesn’t the Portainer UI load inside an iframe?](faqs/troubleshooting/why-doesnt-the-portainer-ui-load-inside-an-iframe.md) * [Contributing](faqs/contributing/README.md) * [How do I report a bug?](faqs/contributing/how-do-i-report-a-bug.md) * [How do I raise a feature request?](faqs/contributing/how-do-i-raise-a-feature-request.md) diff --git a/faqs/troubleshooting/README.md b/faqs/troubleshooting/README.md index 52c8f880..a6817ce6 100644 --- a/faqs/troubleshooting/README.md +++ b/faqs/troubleshooting/README.md @@ -44,3 +44,4 @@ description: >- * [Unable to Authenticate After Portainer Update](unable-to-authenticate-after-portainer-update.md) * [How do I recover orphaned stacks from a previously deleted environment?](how-do-i-recover-orphaned-stacks-from-a-previously-deleted-environment.md) * [How do I change the way I connect to an environment without losing my existing stacks?](how-do-i-change-the-way-i-connect-to-an-environment-without-losing-my-existing-stacks.md) +* [Why doesn’t the Portainer UI load inside an iframe?](why-doesnt-the-portainer-ui-load-inside-an-iframe.md) diff --git a/faqs/troubleshooting/why-doesnt-the-portainer-ui-load-inside-an-iframe.md b/faqs/troubleshooting/why-doesnt-the-portainer-ui-load-inside-an-iframe.md new file mode 100644 index 00000000..27b121bb --- /dev/null +++ b/faqs/troubleshooting/why-doesnt-the-portainer-ui-load-inside-an-iframe.md @@ -0,0 +1,15 @@ +# 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](../../advanced/cli.md#configuration-flags-available-at-the-command-line) when running Portainer. + +{% hint style="danger" %} +This removes **all** of the Content-Security-Policy header, so please use it with caution and at your own risk, and only if you **need** the iframing to work for you. +{% endhint %}