Embedding in iframe
See original GitHub issueWhen 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 <listcomp>
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
Issue Analytics
- State:
- Created 4 years ago
- Comments:12
Top Results From Across the Web
What Is an Iframe? [+ How to Embed Content With Iframes]
As mentioned, we use iframe to embed an HTML document onto a page. Alternatively, embed is used to embed other types of content,...
Read more >From object to iframe — other embedding technologies
First, go to YouTube and find a video you like. · Below the video, you'll find a Share button — select this to...
Read more >How to Create and Embed an Iframe
To embed an iframe in a content page, select Interactive layout, choose the HTML block and paste the iframe code there. You can...
Read more >HTML iframe tag - W3Schools
The <iframe> tag specifies an inline frame. An inline frame is used to embed another document within the current HTML document.
Read more >What is iFrame? How to Embed iFrame in WordPress?
You should only embed an iframe code into your website if it is from a reliable source, and you are certain about the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here is a work around,
Follow the procedure below:
Here is what my config looks like
– /opt/tljh/config/jupyterhub_config.d/jupyterhub_config.py
– /home/shared_config/jupyter_notebook_config.py
Some useful references and related issues:
@AmalVijayan Hi Amal, I am facing the same issue. I have replicated your steps but still getting the error as :
Blocked autofocusing on a <input> element in a cross-origin subframe.
For the pages ahead of the login page. Login page is rendering fine but not able to login.Could anyone throw some light on this?