-
Notifications
You must be signed in to change notification settings - Fork 2
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
新版本 jupyter 似乎导致 PDF 无法显示 / PDF display not working in newer versions of jupyter #1
Comments
bryango
added a commit
that referenced
this issue
Oct 3, 2018
bryango
added a commit
that referenced
this issue
Oct 3, 2018
确认问题由 jupyter 的安全更新 jupyter/notebook#3341 导致。 暴力的解决方案 / my fix: 本人的 package 路径为: Subject: [PATCH] UN-patch #3341
---
base/handlers.py | 7 -------
files/handlers.py | 7 -------
2 files changed, 14 deletions(-)
diff --git a/base/handlers.py b/base/handlers.py
index e3fbddc..72677c9 100644
--- a/base/handlers.py
+++ b/base/handlers.py
@@ -640,13 +640,6 @@ class Template404(IPythonHandler):
class AuthenticatedFileHandler(IPythonHandler, web.StaticFileHandler):
"""static files should only be accessible when logged in"""
- @property
- def content_security_policy(self):
- # In case we're serving HTML/SVG, confine any Javascript to a unique
- # origin so it can't interact with the notebook server.
- return super(AuthenticatedFileHandler, self).content_security_policy + \
- "; sandbox allow-scripts"
-
@web.authenticated
def get(self, path):
if os.path.splitext(path)[1] == '.ipynb' or self.get_argument("download", False):
diff --git a/files/handlers.py b/files/handlers.py
index 7973fd6..b942149 100644
--- a/files/handlers.py
+++ b/files/handlers.py
@@ -26,13 +26,6 @@ class FilesHandler(IPythonHandler):
a subclass of StaticFileHandler.
"""
- @property
- def content_security_policy(self):
- # In case we're serving HTML/SVG, confine any Javascript to a unique
- # origin so it can't interact with the notebook server.
- return super(FilesHandler, self).content_security_policy + \
- "; sandbox allow-scripts"
-
@web.authenticated
def head(self, path):
self.get(path, include_body=False)
--
2.18.0 长远的解决方案得看 upstream 的 jupyter/notebook#3652, 本人无能为力。关闭 issue. |
bryango
added a commit
that referenced
this issue
Nov 18, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
看起来与 jupyter 的验证机制及 Chrome 的安全策略有关,参见 jupyter/notebook#3652.
Seemingly related to jupyter & Chrome's authentication process, see jupyter/notebook#3652.
暂时的解决方案 / Temporary fix:
exN.ipynb
中启用内置 PDF 阅读器模式,即修改初始化单元:The text was updated successfully, but these errors were encountered: