-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Embedding in iframe #312
Comments
Does anybody have any idea? |
@jtpio thank you for opening this issue. Can you try putting the Notebook config in c.NotebookApp.tornado_settings = {
'headers': {
'Content-Security-Policy': 'frame-ancestors self *',
}
} That'll probably work out better than trying to set it via cmd. |
I have the same problem. Is there a solution? |
I've looked at this somewhat extensively. I am using the littlest jupyterhub. There is a related issue here jupyterhub/jupyterhub#379. My configuration looks like this:
and is located at
|
@aryeh-looker I'm facing the same issue as well. I'm able to embed hub pages like |
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:
|
I spent 3 days trying to figure this out because it wasn't working for me. The suggestions regarding the addition of a jupyterhub_config.py worked for me to implement the login page. For actually using the notebook once logged in it didnt work. I had to go into the python file that sets the default Content-Security-Policy. steps I took where as follows. I used grep in the root of my ec2 instance to discover which files contained "frame-ancestors 'self' ". This led me to the file which can be found in the following path opt/tljh/hub/lib/python3.6/site-packages/jupyterhub/handlers/base.py I simply used vim to edit line 193 to include * as well. edit: After doing this i realised it didn't work for new users i created. So to remedy this i went through all the files that contained content-security-policy using grep from my root directory NOTE : This is definitely not safe. It was just something i needed to do for testing and development purposes. |
How would you suggest that you "do this safely" I am looking to embed my Jupyterhub in an iframe on a new website and need to figure out the best way to do this. |
Did you happen to glean any information on any sort of 'safer' workaround than an iframe? |
Unfortunately not. Securitywise my project was too difficult so I called it
quits after a while.
…On Wed, 21 Apr 2021, 15:45 swazonic, ***@***.***> wrote:
How would you suggest that you "do this safely" I am looking to embed my
Jupyterhub in an iframe on a new website and need to figure out the best
way to do this.
Did you happen to glean any information on any sort of 'safer' workaround
than an iframe?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#312 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEM3U3ENQUM335YTLBYP6YLTJ3QHVANCNFSM4HKUHX2Q>
.
|
Hi I'm confronted with the same issue, I've been pulling my hair for 3 days now on how to do this. I have the simplest install on an AWS EC2 instance |
@AmalVijayan Hi Amal, I am facing the same issue. I have replicated your steps but still getting the error as : Could anyone throw some light on this? |
When I try to embedd tljh in iframe with below settings in jupyter_config.py file
I am getting following error when I try to start user server. Any idea what is wrong?
The text was updated successfully, but these errors were encountered: