Open Jupyterhub Application in iFrame

Hi ,

I am trying to open jupyterhub via my web application by providing hub url in iframe.

I have added below properties in jupyterhub_config.py

c.JupyterHub.tornado_settings = {“headers”:{“Access-Control-Allow-Origin”:" * ", “Content-Security-Policy”:“frame-ancestors * any”}}

c.Spawner.args = [’–NotebookApp.allow_origin= * ', ‘–NotebookApp.tornado_settings={“headers”:{“Content-Security-Policy”:"frame-ancestors * self "}}’]

If my web application and hub both are hosted on same node then I am able to access hub via iframe within my web application.
But if web application and hub are hosted on different nodes then it is not working .

Can anyone help me here if I am missing any configuration.

It would be a great help.

If no-one has a solution you can try checking your browser’s JavaScript console to see the error, and modifying your content security policy in response.

@manics I tried different combinations of content security policy based on the error I get but did not get any luck.