# Jupyterhub iframe Forbidden error

**URL:** <https://discourse.jupyter.org/t/jupyterhub-iframe-forbidden-error/29836>\
**Category:** Zero to JupyterHub on Kubernetes\
**Tags:** how-to, help-wanted\
**Created:** [November 6, 2024, 9:43am UTC](https://discourse.jupyter.org/t/jupyterhub-iframe-forbidden-error/29836 "2024-11-06T09:43:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aradhya\_dimri](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/aradhya_dimri/32/14849_2.png) [@aradhya\_dimri](https://discourse.jupyter.org/u/aradhya_dimri)\
**Post date:** [November 6, 2024, 9:43am UTC](https://discourse.jupyter.org/t/jupyterhub-iframe-forbidden-error/29836/1 "2024-11-06T09:43:38Z")

</div>

Could someone please walk me through the precise setup required to open Jupyterhub in an iframe? The configurations I’m using right now are listed below:

```auto
hub:
    extraConfig:
        customCorsConfig: |
        c.Spawner.args = [f'--NotebookApp.allow_origin=*','--NotebookApp.tornado_settings={"headers":{"Content-Security-Policy": "frame-ancestors *;"}, "cookie_options": {"SameSite": "None", "Secure": True}}']
        c.JupyterHub.tornado_settings = {
            'headers': {
                'Access-Control-Allow-Origin': '*',
                'Content-Security-Policy': "frame-ancestors *;"
            },
            "cookie_options": {"SameSite": "None", "Secure": True}
        }

```

I managed to open the flow up to the server selection in iframe with the support of these configurations, however the notebook pod screen would not open after that. It displays an error that is forbidden.

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [November 6, 2024, 6:03pm UTC](https://discourse.jupyter.org/t/jupyterhub-iframe-forbidden-error/29836/2 "2024-11-06T18:03:09Z")

</div>

What singleuser image are you using? Most modern image contain Jupyter Server  
[https://jupyter-server.readthedocs.io/en/latest/users/configuration.html](https://jupyter-server.readthedocs.io/en/latest/users/configuration.html)
