From 97b2ed1884a1c0c6ae357e042f1022963a704315 Mon Sep 17 00:00:00 2001
From: Florian de Boissieu <fdeboiss@gmail.com>
Date: Fri, 30 Sep 2022 15:42:14 +0200
Subject: [PATCH] fix wrong URL for Rstudio behind reverse-proxy

---
 jupyterhub-rstudio-gitlab/rstudio/Dockerfile | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/jupyterhub-rstudio-gitlab/rstudio/Dockerfile b/jupyterhub-rstudio-gitlab/rstudio/Dockerfile
index 6bbf651..03484df 100644
--- a/jupyterhub-rstudio-gitlab/rstudio/Dockerfile
+++ b/jupyterhub-rstudio-gitlab/rstudio/Dockerfile
@@ -1,9 +1,16 @@
 FROM rocker/binder:4.2.1
 
+# jupyterhub must be the same version as in the hub container, otherwise it ends to a 404 error.
 ARG JUPYTERHUB_VERSION=3.0.0
 USER root
-RUN pip3 install --no-cache \
-    jupyterhub==$JUPYTERHUB_VERSION
+
+# Due to issue #134 of jupyter-rsession-proxy behind reverse-proxy.
+# The problem has been fixed but without upgrading version number and not forwarded to pypi,
+# this is why it has to be uninstalled and reinstalled with git repo.
+RUN pip uninstall -y jupyter-rsession-proxy && \
+    pip install --no-cache \
+    jupyterhub==$JUPYTERHUB_VERSION \
+    git+https://github.com/jupyterhub/jupyter-rsession-proxy
 	
 USER ${NB_USER}
 WORKDIR /home/${NB_USER}
-- 
GitLab