-
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
Not working behind a reverse proxy #121
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
We encountered a similar behaviour with rstudio returning a malformed url (in our case the url gets stripped). We are behind a reverse proxy as well and in an Openshift context. In PR #124 we propose a general solution |
@juzdzema You're the real MVP! Thank you so much. I had seen this issue before as I was struggling with the same problem since a few weeks (redirected to http://jupyterhub/user/userid/...). I worked on something else, got back to it today, debugging different things and coming closer to what you did, but then had a quick check in the issues. And BAM! The solution was there. Please accept this small token of gratitude 🍻 |
In my case, it redirects to an URI that contains a (wrong) port specification:
|
@moschlar I had the same issue, with jupyter-rsession-proxy v2.1.0 and jupyter-server-proxy v3.2.2, but my nginx reverse proxy was not configured like the recommendation at https://jupyterhub.readthedocs.io/en/stable/reference/config-proxy.html. After adjusting it to match the recommendation, the port addition problem went away. @victor-moreno Regarding the rewrite, I suspect the rewriting will no longer be necessary due to changes merged for jupyter-server-proxy v3.2.2. I believe it is the hop-by-hop PR, but I haven't tested this yet. Can you please test with the latest releases of jupyter-rsession-proxy and jupyter-server-proxy? If you're still seeing the issue, can you please share your reverse proxy configuration? |
@ryanlovett Hm, I just double-checked it, but it doesn't seem to make a difference... However, this is a z2jh instance which uses chp between my external reverse proxy and the hub/notebook itself... Maybe I need to dig there! |
@moschlar Thanks for checking. The latest does not work on mybinder.org either. I don't know whether mybinder uses the recommended proxy configurations or not (it probably does), but I think that jupyter-rsession-proxy has to work on it regardless. |
I'm getting the same error with that environment.
I'm running a jupyterhub and using cloudflare tunnel as my reverse proxy so I don't exactly have the luxury of configuring nginx differently (per @ryanlovett ... not sure what the "adjustment" needed to be, nor whether I can make such a change). |
Okay, thanks @mathematicalmichael ! Are you able to apply #134 to your environment? |
edits to bottom of Dockerfile:
fixed it! thank you... had a bit of a time trying to figure out what the "solution" was amongst the discussions. The fast reply was much appreciated!!! |
@mathematicalmichael Okay, great. That fixes it on binder as well. I'll merge soon. |
Bug description
For some reason, with jupyterhub (v1.4.2 in docker), behind a reverse proxy, rstudio returns a malformed url, doubling the hostname separated by comma, like: "https://www.myhost.org%2C%20www.myhost.org/jupyter/user/victor/rstudio/auth-sign-in/?appUri=%2F"
The %2C%20 is ", "
In case it helps someone with the same problem, I managed to get a working version with these changes to rewrite_auth. I never got redirected to /auth-sign-in, so the elif is there to keep current version, but is not needed in my setup.
The text was updated successfully, but these errors were encountered: