Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit ee9f829

Browse files
authored
Fix NotebookApp bug in Jupyter install script (#1469)
* Add setting for NotebookApp * Rename origin parameter
1 parent 053a055 commit ee9f829

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

containers/codespaces-linux/.devcontainer/library-scripts/jupyterlab-debian.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ set -e
1414
VERSION=${1:-"latest"}
1515
USERNAME=${2:-"automatic"}
1616
PYTHON=${3:-"python"}
17-
ALLOW_ORIGIN=${4:-""}
17+
ALLOW_ALL_ORIGINS=${4:-""}
1818

1919
# If in automatic mode, determine if a user already exists, if not use vscode
2020
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
@@ -70,6 +70,7 @@ else
7070
sudoUserIf ${PYTHON} -m pip install jupyterlab=="${VERSION}" --no-cache-dir
7171
fi
7272

73-
if [ "${ALLOW_ORIGIN}" = 'true' ]; then
73+
if [ "${ALLOW_ALL_ORIGINS}" = 'true' ]; then
7474
addToJupyterConfig "c.ServerApp.allow_origin = '*'"
75+
addToJupyterConfig "c.NotebookApp.allow_origin = '*'"
7576
fi

script-library/jupyterlab-debian.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ set -e
1414
VERSION=${1:-"latest"}
1515
USERNAME=${2:-"automatic"}
1616
PYTHON=${3:-"python"}
17-
ALLOW_ORIGIN=${4:-""}
17+
ALLOW_ALL_ORIGINS=${4:-""}
1818

1919
# If in automatic mode, determine if a user already exists, if not use vscode
2020
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
@@ -70,6 +70,7 @@ else
7070
sudoUserIf ${PYTHON} -m pip install jupyterlab=="${VERSION}" --no-cache-dir
7171
fi
7272

73-
if [ "${ALLOW_ORIGIN}" = 'true' ]; then
73+
if [ "${ALLOW_ALL_ORIGINS}" = 'true' ]; then
7474
addToJupyterConfig "c.ServerApp.allow_origin = '*'"
75+
addToJupyterConfig "c.NotebookApp.allow_origin = '*'"
7576
fi

0 commit comments

Comments
 (0)