You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to do the following: docker run -it --rm myDockerimg:latest start-notebook.sh --NotebookApp.base_url=/turing/notebooks/f63e305a-539a-4487-b68d-6a147fafb6ee --NotebookApp.token=2VIKxSkcA8o6mEmaIFvQMSO6z1NQOT+txTjWYqk/dv8= --NotebookApp.notebook_dir=/mnt/arcgis --NotebookApp.tornado_settings="{'headers':{'Content-Security-Policy':'frame-ancestors self *.mydomain.com'}}"
I need to launch containers where the CSP could change dynamically, hence why I am not using a config file. However, that space in the tornado_settings is causing me a problem. I have tried numerous attemps of single quotes, double quotes, backslashes, etc. to no avail. Can anyone offer any suggestions?
Looking at the Docker logs, I see Jupyter say this:
Executing the command: jupyter notebook --NotebookApp.base_url=/turing/notebooks/f63e305a-539a-4487-b68d-6a147fafb6ee --NotebookApp.token=2VIKxSkcA8o6mEmaIFvQMSO6z1NQOT+txTjWYqk/dv8= --NotebookApp.notebook_dir=/mnt/arcgis --NotebookApp.tornado_settings={'headers':{'Content-Security-Policy':'frame-ancestors self'}}
The Jupyter HTML Notebook.
This launches a Tornado based HTML Notebook Server that serves up an
HTML5/Javascript Notebook client.
But then complains:
[C 15:56:20.505 NotebookApp] Bad config encountered during initialization:
[C 15:56:20.505 NotebookApp] The 'tornado_settings' trait of a NotebookApp instance must be a dict, but a value of class 'str' (i.e. "{'headers':{'Content-Security-Policy':'frame-ancestors") was specified.
The text was updated successfully, but these errors were encountered:
So basically you can write this piece of code in your jupyter_config.py: c.NotebookApp.tornado_settings = {'headers': { 'Content-Security-Policy': "frame-ancestors *YourDomain.com* 'self' ;",}}
However, if you want to do it dynamically through command line, you can write this in your yml file: command: -c "jupyter lab --NotebookApp.tornado_settings='{\"headers\":{\"Content-Security-Policy\":\"frame-ancestors self *YourDomain.com*; report-uri /api/security/csp-report\"}}'"
Trying to do the following:
docker run -it --rm myDockerimg:latest start-notebook.sh --NotebookApp.base_url=/turing/notebooks/f63e305a-539a-4487-b68d-6a147fafb6ee --NotebookApp.token=2VIKxSkcA8o6mEmaIFvQMSO6z1NQOT+txTjWYqk/dv8= --NotebookApp.notebook_dir=/mnt/arcgis --NotebookApp.tornado_settings="{'headers':{'Content-Security-Policy':'frame-ancestors self *.mydomain.com'}}"
I need to launch containers where the CSP could change dynamically, hence why I am not using a config file. However, that space in the tornado_settings is causing me a problem. I have tried numerous attemps of single quotes, double quotes, backslashes, etc. to no avail. Can anyone offer any suggestions?
Looking at the Docker logs, I see Jupyter say this:
But then complains:
The text was updated successfully, but these errors were encountered: