I’d like to use ungit (which works by starting a server on localhost) on MyBinder. This was nearly easy to do just using Jupyter Server Proxy, and I’m hoping there’s an obvious solution to the problem that presented.
When I start the local server on port 8448 using the Binder terminal and go to a URL that looks like this:
…the page title changes to ‘ungit’, indicating that it is connecting to the localhost server. However, the page resources don’t load. When I look at the console warnings, there are a bunch of 404 errors trying to load resources at URLs like
(to take one random CSS file as an example). I can manually adjust the URL to
and the CSS loads just fine. So what I need to do is to somehow convince the server to retain the
/user/betatim-vscode-binder-2r07b6uj/proxy/8448/ part of the URL when it makes these requests. I assume this can be done by hacking the server code, but I’m wondering if there’s a more general and/or convenient solution.