-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
403 Forbidden when opening files in Jupyter #5067
Comments
The workaround does not work if the notebook is accessed remotely. Even if XSRF is disabled, it does not work. |
When I view a file (non ipynb) or download any file, the page show that the cross origin request was blocked. However, any other operations behave normal. I solved this problem by setting the c.NotebookApp.allow_origin from |
I'm seeing a similar error in Chrome, but not Firefox, when trying to view a local HTML file on the path
and the error:
Everything works fine in Firefox. |
While trying to load image in markdown cell on Sagemaker jupyter notebook the image fails to get loaded in jupyter notebook.
But the same notebook works fine in jupyterlab on sagemaker itself. While trying to open the image in jupterlab separately, i'm able to view it but with jupyterhub i get the below CORS error. Thanks in advance for the help!! 💯 |
workaround using #5067 (comment) works |
Hi, are there any news on this ? |
I am having the same issue. Using an IFrame to display some static html file which references css and js files in the notebook directory. Can't get around the CORB issue, although it works fine in Firefox. |
That's all because of Chrome browser. You shoud set them to the same domain name ,like aa.bb.com cc.bb.com . |
Trying to open an image (.PNG) in Jupyter after uploading it but the following error pops up:
The same error can be seen with other file formats such as .html, .pdf etc. XSRF check should be enabled for this to occur.
Jupyter details
This issue is also seen when downloading a Notebook as .ipynb which is discussed in this issue: #4541
Some more info, this is the error log from Jupyter
Jupyter Notebook was launched with --port 8443 and hosted on the above IP. According to the error message above, it fails this check when XSRF is enabled:
notebook/notebook/base/handlers.py
Lines 415 to 428 in 9560e0c
This check will always fail as the host and referer will never be the same. Furthermore, you cannot set
c.NotebookApp.allow_origin='*'
as an argument as it checks for an explicit value rather than also checking for wildcard:notebook/notebook/base/handlers.py
Lines 432 to 433 in 9560e0c
One workaround I found was to set
c.NotebookApp.allow_origin='<Notebook_Url>'
but that doesn't address the root cause of this issue.The text was updated successfully, but these errors were encountered: