diff --git a/jupyterhub-rstudio-gitlab/rstudio/Dockerfile b/jupyterhub-rstudio-gitlab/rstudio/Dockerfile
index 6bbf65130fb1ca2503d28a8fb6394ecca0c9faa4..03484df0cd8a0cbac6261fcc652de87a3b1f4b33 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}