-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running jupyter lab behind a reverse proxy with rewrite rule #13764
Comments
Hey @chiragjn , thanks for filing this issue! Have you taken a look at Jupyter Enterprise Gateway to see if it offers the options that you need? This might be an issue better suited for Jupyter Server, which interprets URLs and is included with JupyterLab. If enterprise gateway doesn't suit your needs, you might want to check the server issues list and open a new issue in Jupyter Server if none already exists. |
Hey @chiragjn — can you please follow up on the questions from last week? Thanks! |
Hello, I haven't had a chance to take a look at it yet, I'll check it out sometime next week
In my opinion, it is not about interpreting on the server side but rather what value of because this cannot be set to empty string I am leaving this message in a hurry, I'll be back with a potential solution in the jupyter codebase later |
Yep, it definitely needs a As the owner of the docker container, is there any way you can control the base URL dynamically? Some loci are:
It's also worth looking into launching |
Closing this issue because of no new comments in the thread in a couple of weeks. @chiragjn if you have any additional questions, please reopen this issue or open a new one. Thanks! |
Problem
I have jupyter lab running via docker (
jupyter/minimal-notebook:python-3.9.13
) with default settings and I am accessing it via a reverse proxy onhttps://<host>/jupyterlab/
. This reverse proxy is out of my control and it works via a rewrite rule i.e. it mapshttps://<host>/jupyterlab/...
tohttp://<k8s-jupyter-service>:8888/...
.As such I would want the jupyterlab frontend (server APIs are working fine) to understand that all URLs will be relative to
/jupyterlab/
instead of/
I already understand that setting
--NotebookApp.base_url='/jupyterlab/'
along with a simple proxy pass rule instead of a rewrite rule can get everything working but the reverse proxy rules are not in my controlI tried setting
--NotebookApp.base_url=''
to get relative URLs in the UI but the documentation statesSo
--NotebookApp.base_url=''
is equivalent to--NotebookApp.base_url='/'
which is the default.Proposed Solution
--NotebookApp.base_url
when value is explicitly set to empty string. However, I am not sure what else can break with such relative URLsAdditional context
root_path
which only affects the rendered URLs and not the backend API locationsThe text was updated successfully, but these errors were encountered: