Skip to content

Commit 9bef75a

Browse files
committed
base: Update latest Dockerfile
- jupyterhub/jupyter-server-proxy#445
1 parent 4ac2ba0 commit 9bef75a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

base/latest.Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,14 @@ RUN export PIP_BREAK_SYSTEM_PACKAGES=1 \
256256
nbclassic \
257257
nbconvert \
258258
python-lsp-server[all] \
259+
## Fix https://github.com/jupyterhub/jupyter-server-proxy/issues/445
260+
&& pyFile="$(echo /usr/local/lib/python*/*-packages/jupyter_server_proxy/handlers.py)" \
261+
&& sed -i 's/subprotocols=self\.subprotocols/subprotocols=self\.selected_subprotocol/g' \
262+
"$pyFile" \
263+
&& if $(grep -q subprotocols=self.selected_subprotocol "$pyFile"); then \
264+
sed -i '/def select_subprotocol/{:a;N;s/\n[[:blank:]]\+.*//;ta;!P;D}' \
265+
"$pyFile"; \
266+
fi \
259267
## Include custom fonts
260268
&& sed -i 's|</head>|<link rel="preload" href="{{page_config.fullStaticUrl}}/assets/fonts/MesloLGS-NF-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous"></head>|g' /usr/local/share/jupyter/lab/static/index.html \
261269
&& sed -i 's|</head>|<link rel="preload" href="{{page_config.fullStaticUrl}}/assets/fonts/MesloLGS-NF-Italic.woff2" as="font" type="font/woff2" crossorigin="anonymous"></head>|g' /usr/local/share/jupyter/lab/static/index.html \

0 commit comments

Comments
 (0)