ccss17 commited on
Commit
51db343
·
1 Parent(s): a408d9d
Files changed (1) hide show
  1. Dockerfile +6 -4
Dockerfile CHANGED
@@ -24,7 +24,9 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
24
  COPY --chown=user:user . .
25
 
26
  # Step 9: Define the default command to run when the Space starts.
27
- # --- THE FINAL FIX IS HERE ---
28
- # We add `--ServerApp.disable_check_xsrf=True` to tell the server not to
29
- # require the security token that is being blocked by the iframe.
30
- CMD ["python", "-m", "jupyterlab", "--ip=0.0.0.0", "--port=7860", "--NotebookApp.token=''", "--ServerApp.allow_origin='*'", "--ServerApp.allow_remote_access=True", "--ServerApp.disable_check_xsrf=True"]
 
 
 
24
  COPY --chown=user:user . .
25
 
26
  # Step 9: Define the default command to run when the Space starts.
27
+ # --- THE FINAL INTEGRATED FIX IS HERE ---
28
+ # This combines all necessary flags to allow remote access, iframe embedding,
29
+ # and to fix the kernel startup (XSRF) error.
30
+ CMD ["python", "-m", "jupyterlab", "--ip=0.0.0.0", "--port=7860", "--NotebookApp.token=''", "--ServerApp.allow_remote_access=True", "--ServerApp.disable_check_xsrf=True", "--ServerApp.tornado_settings", "{\"headers\": {\"Content-Security-Policy\": \"frame-ancestors * 'self'\"}}"]
31
+ # CMD ["python", "-m", "jupyterlab", "--ip=0.0.0.0", "--port=7860", "--NotebookApp.token=''", "--ServerApp.tornado_settings", "{\"headers\": {\"Content-Security-Policy\": \"frame-ancestors * 'self'\"}}"]
32
+ # CMD ["python", "-m", "jupyterlab", "--ip=0.0.0.0", "--port=7860", "--NotebookApp.token=''", "--ServerApp.allow_origin='*'", "--ServerApp.allow_remote_access=True", "--ServerApp.disable_check_xsrf=True"]