question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proxying relative URLs in redirects

See original GitHub issue

In gitter I was chatting with @yuvipanda about the possibility of proxying one version of JupyterLab (specifically using --dev-mode) underneath the main one running in binder. https://gitter.im/jupyterhub/binder?at=5c42411983189945240fa7af

In trying this I ran into an issue with redirects. The proxied notebook server returns several redirects towards the default page, but when these redirects (e.g., to /lab), are received by the outer notebook server, they are then used to proxy to a page there rather than a page on the proxied server. This is not the effect I was looking for, and it seems to make pages in the proxied server entirely inaccessible if there is a redirect in the way.

This can be tested locally in this branch by running jupyter notebook --config=binder/config.py. Any thoughts on how to move forward?

I don’t know a ton about the right language around proxies, so apologies if this is using the wrong language or is easily fixable 😃

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
manicscommented, Feb 4, 2019
  • /proxy/12345/sub/path will rewrite the proxied URL so the application see /sub/path, but with HTTP headers to indicate it’s running under /proxy/12345
  • /proxy/absolute/12345/sub/path passes the full URL directly so the application sees /proxy/absolute/12345/sub/path and no special headers are set

Also see my reply on https://discourse.jupyter.org/t/pgadmin-in-mybinder/365/6

0reactions
ian-r-rosecommented, Feb 22, 2019

@yuvipanda This was fixed by #85, right?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to handle relative urls correctly with a reverse proxy
How do I fix this? So far my reverse proxy has this on Server A (www.example.com): <Location /folder> ProxyPass http://test.
Read more >
Apache reverse proxy: how to redirect relative URLs in ...
I learned that the easiest way to do this is to set up a reverse proxy so that Apache would retrieve external.com/onlyforme when...
Read more >
Redirect URL: use relative PATH or correct protocol sheme
All redirect URLs use an absolute URL. Some redirect URLs seem to use HTTP protocol instead of HTTPS protocol. The Strict-Transport-Security ...
Read more >
relative vs absolute urls (problem with proxy) - JBoss.org
Hi, I trying to deploy jboss seam application in the following configuration: Apache as a front server and jboss as as my application...
Read more >
63357 – Allowing generated URLs to be relative
It makes Apache useless as an application reverse proxy behind say, ... nginx supports a flag for relative redirect Location URLs.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found