Skip to content

Can not use JupyterLab or Jupyter Notebooks with unsafe-eval turned off in Content Security Policy #6129

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

Closed
MikeMcGarry opened this issue Aug 10, 2021 · 2 comments · Fixed by #6131

Comments

@MikeMcGarry
Copy link

Describe the bug

Since 5 days ago the juptyer/notebook now uses a --development webpack build by default.

Unfortunately this is incompatible with a sensible Content Security Policy which does not have unsafe-eval included.

This is the line here: https://github.com/jupyter/notebook/blame/79fc76e890a8ec42f73a3d009e44ef84c14ef0d5/package.json#L20

And this is the merge request here: 79fc76e

To Reproduce
Steps to reproduce the behavior:

  1. Install JupyterHub using the most recent version of the notebook
  2. Visit your installation from any browser with a Content Security Policy that does not contain unsafe-eval. You will get nothing rendered when trying to run a notebook and the following console error

Expected behavior
No console error and everything works as expected.

Screenshots
image

Desktop (please complete the following information):

  • Chrome
  • Safari
  • Edge

Additional context
Add any other context about the problem here.

@meeseeksmachine
Copy link

This issue has been mentioned on Jupyter Community Forum. There might be relevant details there:

https://discourse.jupyter.org/t/can-not-use-jupyterlab-or-jupyter-notebooks-with-unsafe-eval-turned-off-in-content-security-policy/10321/2

@MikeMcGarry
Copy link
Author

Thank you for addressing this so quickly!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants