-
Notifications
You must be signed in to change notification settings - Fork 87
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
Rewrite malformed root url #124
base: main
Are you sure you want to change the base?
Conversation
Definitely solved the problem in my case where I was redirected to https://jupyterhub/user/userid/rstudio (no more original full host location). |
Is this merged? I am facing the same problem in openshift 4 |
Thanks for the PR @juzdzema and everyone for their feedback and patience. It is somewhat surprising that this fix works since it replaces the check for /auth-sign-in. This suggests that in your environments, RStudio never sends users to that path, yet another kind of mangling is happening. In my environment and in most others I've deployed to, we definitely do see the /auth-sign-in issue. So I suspect this PR may not work for me, but I need to test. For those reverse proxying, can you please let me know how you're configuring the hub? Are your configs anything like what jupyterhub recommends at https://jupyterhub.readthedocs.io/en/stable/reference/config-proxy.html ? |
I am using community version of RStudio and deployed Jupyterhub in Openshift 4. Every config is default in Jupyterhub. (no reverseproxy config) For me being able to use binder r-image under this deployment I have to build the image using repo2docker on binder-example template and at the postBuild stage I uninstall the default jupyter-rsession-proxy and install it again but now using @juzdzema patch. If you want to try this PR in your environment maybe you can try this. Thanks! |
If that helps, this is my config that works for JupyterHub deployed on OpenShift as part of Open Data Hub: https://github.com/guimou/custom-notebooks/blob/main/jupyterhub-images/r-notebook/container/jupyter-rsession-proxy/jupyter_rsession_proxy/__init__.py |
@lucianolacurcia I can confirm that the latest version of jupyter-rsession-proxy and jupyter-server-proxy does not work on mybinder. |
@juzdzema I'm trying to identify cases that jupyter-rsession-proxy needs to handle, and what may be incorrect reverse proxy configurations. It seems that what may work for some may not impact, or may break others. If it is not possible to identify or correct root causes, then the long term solution may be to include multiple rewrite_ functions (including the one here), and then enable hub admins to easily enable those that fix their particular deployments. I haven't been able to reproduce your issue, though I was able to reproduce and fix another. The fix is similar to yours in #124, but that wouldn't have worked for this latter case since In the meantime, can you please share your reverse proxy configuration? Can you also please let me know the behavior if you install the latest version of jupyter-server-proxy? |
@ryanlovett user behind reverse proxy here. not sure if I'm testing this PR quite right but I tried adding this to the bottom of my image
to install the changes on this PR and found I was still being mis-directed. I'm running cloudflare tunnels as my reverse proxy, just telling it the docker IP / internal port and letting it handle the rest. I encountered this when trying to do my occasional upgrade to the RStudio image / jupyterhub version; RStudio's changes are always the most challenging part it seems... (it was already enough of a surprise to find out the config file for |
I think #144 is related |
Fixes #121