2

jupyterhub で実行されている jupyterlab を iframe に統合しようとしています。構成ファイルに必要なすべての変更を加えました。jupyter_notebook_config.py で、次の変更を行いました。

c.NotebookApp.tornado_settings = {'headers': {
    'Access-Control-Allow-Origin': '*',
    'Content-Security-Policy': 'frame-ancestors http://localhost:9005'
  }}

jupyterhub_config.py に以下を追加しました

c.JupyterHub.tornado_settings = {'headers': {
    'Access-Control-Allow-Origin': '*',
    'Content-Security-Policy': 'frame-ancestors http://localhost:9005'
  }}

それでも、iframe でhttp://localhost:8002/user/admin/lab URLを開こうとすると、次のエラーが発生します。

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'".

何か不足している場合、または構成に問題がある場合は、誰かに知らせてもらえますか?

4

1 に答える 1