When I try to embedd tljh in iframe with below settings in jupyter_config.py file
c.JupyterHub.tornado_settings = {
‘headers’: {
‘Content-Security-Policy’: ‘frame-ancestors self *’,
}
}
c.Spawner.args = [“'–NotebookApp.tornado_settings={‘headers’: {‘Content-Security-Policy’: 'frame-ancestors self * ‘, }}’”]
I am getting following error when I try to start user server. Any idea what is wrong?
May 03 14:03:25 instance-5 python3[31964]: KeyError: “‘headers’”
May 03 14:03:25 instance-5 python3[31964]: USERID=self.user.id
May 03 14:03:25 instance-5 python3[31964]: File “/opt/tljh/hub/lib/python3.6/site-packages/systemdspawner/systemdspawner.py”, line 157, in _expand_user_vars
May 03 14:03:25 instance-5 python3[31964]: args=[self._expand_user_vars(a) for a in self.get_args()],
May 03 14:03:25 instance-5 python3[31964]: File “/opt/tljh/hub/lib/python3.6/site-packages/systemdspawner/systemdspawner.py”, line 280, in
May 03 14:03:25 instance-5 python3[31964]: args=[self._expand_user_vars(a) for a in self.get_args()],
May 03 14:03:25 instance-5 python3[31964]: File “/opt/tljh/hub/lib/python3.6/site-packages/systemdspawner/systemdspawner.py”, line 280, in start
May 03 14:03:25 instance-5 python3[31964]: url = await gen.with_timeout(timedelta(seconds=spawner.start_timeout), f)
May 03 14:03:25 instance-5 python3[31964]: File “/opt/tljh/hub/lib/python3.6/site-packages/jupyterhub/user.py”, line 409, in spawn
May 03 14:03:25 instance-5 python3[31964]: raise e
May 03 14:03:25 instance-5 python3[31964]: File “/opt/tljh/hub/lib/python3.6/site-packages/jupyterhub/user.py”, line 489, in spawn