• jupyter生成的html作为iframe嵌过去,遇到an ancestor violates the following Content Security Policy directive: “frame-ancestors ‘self’问题
  • 解决办法 在启动时加入以下–NotebookApp.tornado_settings:
jupyter notebook --NotebookApp.tornado_settings='{"headers" :{"Content-Security-Policy" :"frame-ancestors self http://*.*.*.*:5028 http://0.0.0.0:5028  http://*.*.*.*:5022 http://*.*.*.*:8080 http://localhost:8080; "}}'  --no-browser --port=5028 --ip=0.0.0.0 --allow-root
  • 在后面的ip+端口处,ip和端口要包括部署前端的ip和端口另外还要有后端服务器相应的端口和ip,如果要启动jupyter notebook 页面 ,也要把启动该页面的端口和ip加进去。
瀚海蓝甘
原创文章 16获赞 3访问量 1417
关注私信
展开阅读全文