jupyter / notebook

Jupyter Interactive Notebook
https://jupyter-notebook.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
11.75k stars 4.99k forks source link

Notebook base_url configuration always keeps "/" even when configured with empty string #3663

Open GMNetto opened 6 years ago

GMNetto commented 6 years ago

Hi,

I am trying to make the html and other served files by the notebook relative to the entire path. However, the base_url configuration always results on the notebook serving files with "/" as the first character. The html code below is the result of using jupyter notebook --NotebookApp.base_url=""

<link rel="stylesheet" href="/static/components/...
    <link rel="stylesheet" href="/static/components/...

I would like to know if there is a work around for this problem, or if there is another way to make relative to the entire path. My final objective would be serving jupyter with reverse proxy.

tverbeke commented 6 years ago

Hello, we also think that allowing for relative URLs would be very useful and would allow to integrate Jupyter notebooks with larger applications. In our use case, it would allow to run notebooks next to Shiny and Dash apps inside ShinyProxy.

If we would work on a pull request, is this something you would consider adding, or would we need very deep experience with the code base?

willsoto commented 4 years ago

@GMNetto @tverbeke did either of you ever find a solution to this?

It seems like it might be by design, see here. But this causes issues since it always tries to redirect back to /${base_url}/tree which causes problems if you are sitting behind a proxy, for example.

DrowningFish commented 5 months ago

mark