Launch IPython Notebook in iframe from another domain

I want to run an IPython laptop that is on my server inside an iframe on another server. I get this error:

Refused to display 'my_url/Test.ipynb' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN' 

It says here that I have to set the x-frame-header parameter for it: http://ipython.org/ipython-doc/dev/whatsnew/development.html#iframe-embedding

Where can i install this? How to change this X-Frame-Option so that it can be embedded from another site? :)

+5
source share
1 answer

Update

according to Harrison's comment, this should be

 c.NotebookApp.tornado_settings = {'headers': {'X-Frame-Options': 'ALLOW-FROM https://example.com/'}} 

now, see also http://jupyter-notebook.readthedocs.io/en/stable/config.html

Original publication

Ok, I found a solution that works, but I'm not 100% sure if this is the right way to do it: In .ipython / your_profile / ipython_notebook_config.py add

 c.NotebookApp.webapp_settings = {'headers': {'X-Frame-Options': 'ALLOW-FROM https://example.com/'}} 

Works for me, but not sure if this overrides more settings from a tornado or something else :)

+2
source

Source: https://habr.com/ru/post/1200414/


All Articles