educrpg commited on
Commit
a21c0f6
·
verified ·
1 Parent(s): b21141a

Update start_server.sh

Browse files
Files changed (1) hide show
  1. start_server.sh +4 -2
start_server.sh CHANGED
@@ -3,17 +3,19 @@ JUPYTER_TOKEN="${JUPYTER_TOKEN:=huggingface}"
3
 
4
  NOTEBOOK_DIR="/data"
5
 
 
6
  jupyter labextension disable "@jupyterlab/apputils-extension:announcements"
7
 
 
8
  jupyter-lab \
9
  --ip 0.0.0.0 \
10
  --port 7860 \
11
  --no-browser \
12
  --allow-root \
13
  --ServerApp.token="$JUPYTER_TOKEN" \
14
- --ServerApp.tornado_settings="{'headers': {'Content-Security-Policy': 'frame-ancestors *'}}" \
15
- --ServerApp.cookie_options="{'SameSite': 'None', 'Secure': True}" \
16
  --ServerApp.disable_check_xsrf=True \
 
 
17
  --LabApp.news_url=None \
18
  --LabApp.check_for_updates_class="jupyterlab.NeverCheckForUpdate" \
19
  --notebook-dir=$NOTEBOOK_DIR
 
3
 
4
  NOTEBOOK_DIR="/data"
5
 
6
+ # Disable default announcement popup
7
  jupyter labextension disable "@jupyterlab/apputils-extension:announcements"
8
 
9
+ # Start JupyterLab with relaxed security headers to allow iframe embedding
10
  jupyter-lab \
11
  --ip 0.0.0.0 \
12
  --port 7860 \
13
  --no-browser \
14
  --allow-root \
15
  --ServerApp.token="$JUPYTER_TOKEN" \
 
 
16
  --ServerApp.disable_check_xsrf=True \
17
+ --ServerApp.cookie_options="{'SameSite': 'None', 'Secure': True}" \
18
+ --ServerApp.tornado_settings="{'headers': {'Content-Security-Policy': 'frame-ancestors *', 'X-Frame-Options': 'ALLOWALL'}}" \
19
  --LabApp.news_url=None \
20
  --LabApp.check_for_updates_class="jupyterlab.NeverCheckForUpdate" \
21
  --notebook-dir=$NOTEBOOK_DIR