I am trying to integrate jupyterlab running with jupyterhub into an iframe. I made all the required changes in the configuration files. In the jupyter_notebook_config.py I have made the following changes.
c.NotebookApp.tornado_settings = {'headers': {
'Access-Control-Allow-Origin': '*',
'Content-Security-Policy': 'frame-ancestors http://localhost:9005'
}}
while in the jupyterhub_config.py I have added the following
c.JupyterHub.tornado_settings = {'headers': {
'Access-Control-Allow-Origin': '*',
'Content-Security-Policy': 'frame-ancestors http://localhost:9005'
}}
But still, when I try to open http://localhost:8002/user/admin/lab URL in the iframe I get the following error
Refused to display 'http://localhost:8002/user/admin/lab' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self'".
Can someone let me know if I am missing something or is there an issue with my configuration?